/*! * jQuery corner plugin: simple corner rounding * Examples and documentation at: http://jquery.malsup.com/corner/ * version 2.12 (23-MAY-2011) * Requires jQuery v1.3.2 or later * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * Authors: Dave Methvin and Mike Alsup */ /** * corner() takes a single string argument: $('#myDiv').corner("effect corners width") * * effect: name of the effect to apply, such as round, bevel, notch, bite, etc (default is round). * corners: one or more of: top, bottom, tr, tl, br, or bl. (default is all corners) * width: width of the effect; in the case of rounded corners this is the radius. * specify this value using the px suffix such as 10px (yes, it must be pixels). */ jQuery.browser = {}; (function () { jQuery.browser.msie = false; jQuery.browser.version = 0; if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) { jQuery.browser.msie = true; jQuery.browser.version = RegExp.$1; } })(); ;(function($) { var style = document.createElement('div').style, moz = style['MozBorderRadius'] !== undefined, webkit = style['WebkitBorderRadius'] !== undefined, radius = style['borderRadius'] !== undefined || style['BorderRadius'] !== undefined, mode = document.documentMode || 0, noBottomFold = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8), expr = $.browser.msie && (function() { var div = document.createElement('div'); try { div.style.setExpression('width','0+0'); div.style.removeExpression('width'); } catch(e) { return false; } return true; })(); $.support = $.support || {}; $.support.borderRadius = moz || webkit || radius; // so you can do: if (!$.support.borderRadius) $('#myDiv').corner(); function sz(el, p) { return parseInt($.css(el,p))||0; }; function hex2(s) { s = parseInt(s).toString(16); return ( s.length < 2 ) ? '0'+s : s; }; function gpc(node) { while(node) { var v = $.css(node,'backgroundColor'), rgb; if (v && v != 'transparent' && v != 'rgba(0, 0, 0, 0)') { if (v.indexOf('rgb') >= 0) { rgb = v.match(/\d+/g); return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]); } return v; } if (node.nodeName.toLowerCase() == 'html') break; node = node.parentNode; // keep walking if transparent } return '#ffffff'; }; function getWidth(fx, i, width) { switch(fx) { case 'round': return Math.round(width*(1-Math.cos(Math.asin(i/width)))); case 'cool': return Math.round(width*(1+Math.cos(Math.asin(i/width)))); case 'sharp': return width-i; case 'bite': return Math.round(width*(Math.cos(Math.asin((width-i-1)/width)))); case 'slide': return Math.round(width*(Math.atan2(i,width/i))); case 'jut': return Math.round(width*(Math.atan2(width,(width-i-1)))); case 'curl': return Math.round(width*(Math.atan(i))); case 'tear': return Math.round(width*(Math.cos(i))); case 'wicked': return Math.round(width*(Math.tan(i))); case 'long': return Math.round(width*(Math.sqrt(i))); case 'sculpt': return Math.round(width*(Math.log((width-i-1),width))); case 'dogfold': case 'dog': return (i&1) ? (i+1) : width; case 'dog2': return (i&2) ? (i+1) : width; case 'dog3': return (i&3) ? (i+1) : width; case 'fray': return (i%2)*width; case 'notch': return width; case 'bevelfold': case 'bevel': return i+1; case 'steep': return i/2 + 1; case 'invsteep':return (width-i)/2+1; } }; $.fn.corner = function(options) { // in 1.3+ we can fix mistakes with the ready state if (this.length == 0) { if (!$.isReady && this.selector) { var s = this.selector, c = this.context; $(function() { $(s,c).corner(options); }); } return this; } return this.each(function(index){ var $this = $(this), // meta values override options o = [$this.attr($.fn.corner.defaults.metaAttr) || '', options || ''].join(' ').toLowerCase(), keep = /keep/.test(o), // keep borders? cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]), // corner color sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]), // strip color width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10, // corner width re = /round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog|invsteep|steep/, fx = ((o.match(re)||['round'])[0]), fold = /dogfold|bevelfold/.test(o), edges = { T:0, B:1 }, opts = { TL: /top|tl|left/.test(o), TR: /top|tr|right/.test(o), BL: /bottom|bl|left/.test(o), BR: /bottom|br|right/.test(o) }, // vars used in func later strip, pad, cssHeight, j, bot, d, ds, bw, i, w, e, c, common, $horz; if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR ) opts = { TL:1, TR:1, BL:1, BR:1 }; // support native rounding if ($.fn.corner.defaults.useNative && fx == 'round' && (radius || moz || webkit) && !cc && !sc) { if (opts.TL) $this.css(radius ? 'border-top-left-radius' : moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px'); if (opts.TR) $this.css(radius ? 'border-top-right-radius' : moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px'); if (opts.BL) $this.css(radius ? 'border-bottom-left-radius' : moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px'); if (opts.BR) $this.css(radius ? 'border-bottom-right-radius' : moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px'); return; } strip = document.createElement('div'); $(strip).css({ overflow: 'hidden', height: '1px', minHeight: '1px', fontSize: '1px', backgroundColor: sc || 'transparent', borderStyle: 'solid' }); pad = { T: parseInt($.css(this,'paddingTop'))||0, R: parseInt($.css(this,'paddingRight'))||0, B: parseInt($.css(this,'paddingBottom'))||0, L: parseInt($.css(this,'paddingLeft'))||0 }; if (typeof this.style.zoom != undefined) this.style.zoom = 1; // force 'hasLayout' in IE if (!keep) this.style.border = 'none'; strip.style.borderColor = cc || gpc(this.parentNode); cssHeight = $(this).outerHeight(); for (j in edges) { bot = edges[j]; // only add stips if needed if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) { strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none'); d = document.createElement('div'); $(d).addClass('jquery-corner'); ds = d.style; bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild); if (bot && cssHeight != 'auto') { if ($.css(this,'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.bottom = ds.left = ds.padding = ds.margin = '0'; if (expr) ds.setExpression('width', 'this.parentNode.offsetWidth'); else ds.width = '100%'; } else if (!bot && $.browser.msie) { if ($.css(this,'position') == 'static') this.style.position = 'relative'; ds.position = 'absolute'; ds.top = ds.left = ds.right = ds.padding = ds.margin = '0'; // fix ie6 problem when blocked element has a border width if (expr) { bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth'); ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"'); } else ds.width = '100%'; } else { ds.position = 'relative'; ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' : (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px'; } for (i=0; i < width; i++) { w = Math.max(0,getWidth(fx,i, width)); e = strip.cloneNode(false); e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px'; bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild); } if (fold && $.support.boxModel) { if (bot && noBottomFold) continue; for (c in opts) { if (!opts[c]) continue; if (bot && (c == 'TL' || c == 'TR')) continue; if (!bot && (c == 'BL' || c == 'BR')) continue; common = { position: 'absolute', border: 'none', margin: 0, padding: 0, overflow: 'hidden', backgroundColor: strip.style.borderColor }; $horz = $('
').css(common).css({ width: width + 'px', height: '1px' }); switch(c) { case 'TL': $horz.css({ bottom: 0, left: 0 }); break; case 'TR': $horz.css({ bottom: 0, right: 0 }); break; case 'BL': $horz.css({ top: 0, left: 0 }); break; case 'BR': $horz.css({ top: 0, right: 0 }); break; } d.appendChild($horz[0]); var $vert = $('
').css(common).css({ top: 0, bottom: 0, width: '1px', height: width + 'px' }); switch(c) { case 'TL': $vert.css({ left: width }); break; case 'TR': $vert.css({ right: width }); break; case 'BL': $vert.css({ left: width }); break; case 'BR': $vert.css({ right: width }); break; } d.appendChild($vert[0]); } } } } }); }; $.fn.uncorner = function() { if (radius || moz || webkit) this.css(radius ? 'border-radius' : moz ? '-moz-border-radius' : '-webkit-border-radius', 0); $('div.jquery-corner', this).remove(); return this; }; // expose options $.fn.corner.defaults = { useNative: true, // true if plugin should attempt to use native browser support for border radius rounding metaAttr: 'data-corner' // name of meta attribute to use for options }; })(jQuery);/* jQuery elevateZoom 3.0.8 - Demo's and documentation: - www.elevateweb.co.uk/image-zoom - Copyright (c) 2013 Andrew Eades - www.elevateweb.co.uk - Dual licensed under the LGPL licenses. - http://en.wikipedia.org/wiki/MIT_License - http://en.wikipedia.org/wiki/GNU_General_Public_License */ "function" !== typeof Object.create && (Object.create = function(d) { function h() {} h.prototype = d; return new h }); (function(d, h, l, m) { var k = { init: function(b, a) { var c = this; c.elem = a; c.$elem = d(a); c.imageSrc = c.$elem.data("zoom-image") ? c.$elem.data("zoom-image") : c.$elem.attr("src"); c.options = d.extend({}, d.fn.elevateZoom.options, b); c.options.tint && (c.options.lensColour = "none", c.options.lensOpacity = "1"); "inner" == c.options.zoomType && (c.options.showLens = !1); c.$elem.parent().removeAttr("title").removeAttr("alt"); c.zoomImage = c.imageSrc; c.refresh(1); d("#" + c.options.gallery + " a").click(function(a) { c.options.galleryActiveClass && (d("#" + c.options.gallery + " a").removeClass(c.options.galleryActiveClass), d(this).addClass(c.options.galleryActiveClass)); a.preventDefault(); d(this).data("zoom-image") ? c.zoomImagePre = d(this).data("zoom-image") : c.zoomImagePre = d(this).data("image"); c.swaptheimage(d(this).data("image"), c.zoomImagePre); return !1 }) }, refresh: function(b) { var a = this; setTimeout(function() { a.fetch(a.imageSrc) }, b || a.options.refresh) }, fetch: function(b) { var a = this, c = new Image; c.onload = function() { a.largeWidth = c.width; a.largeHeight = c.height; a.startZoom(); a.currentImage = a.imageSrc; a.options.onZoomedImageLoaded(a.$elem) }; c.src = b }, startZoom: function() { var b = this; b.nzWidth = b.$elem.width(); b.nzHeight = b.$elem.height(); b.isWindowActive = !1; b.isLensActive = !1; b.isTintActive = !1; b.overWindow = !1; b.options.imageCrossfade && (b.zoomWrap = b.$elem.wrap('
'), b.$elem.css("position", "absolute")); b.zoomLock = 1; b.scrollingLock = !1; b.changeBgSize = !1; b.currentZoomLevel = b.options.zoomLevel; b.nzOffset = b.$elem.offset(); b.widthRatio = b.largeWidth / b.currentZoomLevel / b.nzWidth; b.heightRatio = b.largeHeight / b.currentZoomLevel / b.nzHeight; "window" == b.options.zoomType && (b.zoomWindowStyle = "overflow: hidden;background-position: 0px 0px;text-align:center;background-color: " + String(b.options.zoomWindowBgColour) + ";width: " + String(b.options.zoomWindowWidth) + "px;height: " + String(b.options.zoomWindowHeight) + "px;float: left;background-size: " + b.largeWidth / b.currentZoomLevel + "px " + b.largeHeight / b.currentZoomLevel + "px;display: none;z-index:100;border: " + String(b.options.borderSize) + "px solid " + b.options.borderColour + ";background-repeat: no-repeat;position: absolute;"); if ("inner" == b.options.zoomType) { var a = b.$elem.css("border-left-width"); b.zoomWindowStyle = "overflow: hidden;margin-left: " + String(a) + ";margin-top: " + String(a) + ";background-position: 0px 0px;width: " + String(b.nzWidth) + "px;height: " + String(b.nzHeight) + "px;float: left;display: none;cursor:" + b.options.cursor + ";px solid " + b.options.borderColour + ";background-repeat: no-repeat;position: absolute;" } "window" == b.options.zoomType && (lensHeight = b.nzHeight < b.options.zoomWindowWidth / b.widthRatio ? b.nzHeight : String(b.options.zoomWindowHeight / b.heightRatio), lensWidth = b.largeWidth < b.options.zoomWindowWidth ? b.nzWidth : b.options.zoomWindowWidth / b.widthRatio, b.lensStyle = "background-position: 0px 0px;width: " + String(b.options.zoomWindowWidth / b.widthRatio) + "px;height: " + String(b.options.zoomWindowHeight / b.heightRatio) + "px;float: right;display: none;overflow: hidden;z-index: 999;opacity:" + b.options.lensOpacity + ";filter: alpha(opacity = " + 100 * b.options.lensOpacity + "); zoom:1;width:" + lensWidth + "px;height:" + lensHeight + "px;background-color:" + b.options.lensColour + ";cursor:" + b.options.cursor + ";border: " + b.options.lensBorderSize + "px solid " + b.options.lensBorderColour + ";background-repeat: no-repeat;position: absolute;"); b.tintStyle = "display: block;position: absolute;background-color: " + b.options.tintColour + ";filter:alpha(opacity=0);opacity: 0;width: " + b.nzWidth + "px;height: " + b.nzHeight + "px;"; b.lensRound = ""; "lens" == b.options.zoomType && (b.lensStyle = "background-position: 0px 0px;float: left;display: none;border: " + String(b.options.borderSize) + "px solid " + b.options.borderColour + ";width:" + String(b.options.lensSize) + "px;height:" + String(b.options.lensSize) + "px;background-repeat: no-repeat;position: absolute;"); "round" == b.options.lensShape && (b.lensRound = "border-top-left-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) + "px;border-top-right-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) + "px;border-bottom-left-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) + "px;border-bottom-right-radius: " + String(b.options.lensSize / 2 + b.options.borderSize) + "px;"); b.zoomContainer = d('
'); d("body").append(b.zoomContainer); b.options.containLensZoom && "lens" == b.options.zoomType && b.zoomContainer.css("overflow", "hidden"); "inner" != b.options.zoomType && (b.zoomLens = d("
 
").appendTo(b.zoomContainer).click(function() { b.$elem.trigger("click") }), b.options.tint && (b.tintContainer = d("
").addClass("tintContainer"), b.zoomTint = d("
"), b.zoomLens.wrap(b.tintContainer), b.zoomTintcss = b.zoomLens.after(b.zoomTint), b.zoomTintImage = d('').appendTo(b.zoomLens).click(function() { b.$elem.trigger("click") }))); isNaN(b.options.zoomWindowPosition) ? b.zoomWindow = d("
 
").appendTo("body").click(function() { b.$elem.trigger("click") }) : b.zoomWindow = d("
 
").appendTo(b.zoomContainer).click(function() { b.$elem.trigger("click") }); b.zoomWindowContainer = d("
").addClass("zoomWindowContainer").css("width", b.options.zoomWindowWidth); b.zoomWindow.wrap(b.zoomWindowContainer); "lens" == b.options.zoomType && b.zoomLens.css({ backgroundImage: "url('" + b.imageSrc + "')" }); "window" == b.options.zoomType && b.zoomWindow.css({ backgroundImage: "url('" + b.imageSrc + "')" }); "inner" == b.options.zoomType && b.zoomWindow.css({ backgroundImage: "url('" + b.imageSrc + "')" }); b.$elem.bind("touchmove", function(a) { a.preventDefault(); b.setPosition(a.originalEvent.touches[0] || a.originalEvent.changedTouches[0]) }); b.zoomContainer.bind("touchmove", function(a) { "inner" == b.options.zoomType && b.showHideWindow("show"); a.preventDefault(); b.setPosition(a.originalEvent.touches[0] || a.originalEvent.changedTouches[0]) }); b.zoomContainer.bind("touchend", function(a) { b.showHideWindow("hide"); b.options.showLens && b.showHideLens("hide"); b.options.tint && "inner" != b.options.zoomType && b.showHideTint("hide") }); b.$elem.bind("touchend", function(a) { b.showHideWindow("hide"); b.options.showLens && b.showHideLens("hide"); b.options.tint && "inner" != b.options.zoomType && b.showHideTint("hide") }); b.options.showLens && (b.zoomLens.bind("touchmove", function(a) { a.preventDefault(); b.setPosition(a.originalEvent.touches[0] || a.originalEvent.changedTouches[0]) }), b.zoomLens.bind("touchend", function(a) { b.showHideWindow("hide"); b.options.showLens && b.showHideLens("hide"); b.options.tint && "inner" != b.options.zoomType && b.showHideTint("hide") })); b.$elem.bind("mousemove", function(a) { !1 == b.overWindow && b.setElements("show"); if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a; b.lastX = a.clientX; b.lastY = a.clientY }); b.zoomContainer.bind("mousemove", function(a) { !1 == b.overWindow && b.setElements("show"); if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a; b.lastX = a.clientX; b.lastY = a.clientY }); "inner" != b.options.zoomType && b.zoomLens.bind("mousemove", function(a) { if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a; b.lastX = a.clientX; b.lastY = a.clientY }); b.options.tint && "inner" != b.options.zoomType && b.zoomTint.bind("mousemove", function(a) { if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a; b.lastX = a.clientX; b.lastY = a.clientY }); "inner" == b.options.zoomType && b.zoomWindow.bind("mousemove", function(a) { if (b.lastX !== a.clientX || b.lastY !== a.clientY) b.setPosition(a), b.currentLoc = a; b.lastX = a.clientX; b.lastY = a.clientY }); b.zoomContainer.add(b.$elem).mouseenter(function() { !1 == b.overWindow && b.setElements("show") }).mouseleave(function() { b.scrollLock || b.setElements("hide") }); "inner" != b.options.zoomType && b.zoomWindow.mouseenter(function() { b.overWindow = !0; b.setElements("hide") }).mouseleave(function() { b.overWindow = !1 }); b.minZoomLevel = b.options.minZoomLevel ? b.options.minZoomLevel : 2 * b.options.scrollZoomIncrement; b.options.scrollZoom && b.zoomContainer.add(b.$elem).bind("mousewheel DOMMouseScroll MozMousePixelScroll", function(a) { b.scrollLock = !0; clearTimeout(d.data(this, "timer")); d.data(this, "timer", setTimeout(function() { b.scrollLock = !1 }, 250)); var e = a.originalEvent.wheelDelta || -1 * a.originalEvent.detail; a.stopImmediatePropagation(); a.stopPropagation(); a.preventDefault(); 0 < e / 120 ? b.currentZoomLevel >= b.minZoomLevel && b.changeZoomLevel(b.currentZoomLevel - b.options.scrollZoomIncrement) : b.options.maxZoomLevel ? b.currentZoomLevel <= b.options.maxZoomLevel && b.changeZoomLevel(parseFloat(b.currentZoomLevel) + b.options.scrollZoomIncrement) : b.changeZoomLevel(parseFloat(b.currentZoomLevel) + b.options.scrollZoomIncrement); return !1 }) }, setElements: function(b) { if (!this.options.zoomEnabled) return !1; "show" == b && this.isWindowSet && ("inner" == this.options.zoomType && this.showHideWindow("show"), "window" == this.options.zoomType && this.showHideWindow("show"), this.options.showLens && this.showHideLens("show"), this.options.tint && "inner" != this.options.zoomType && this.showHideTint("show")); "hide" == b && ("window" == this.options.zoomType && this.showHideWindow("hide"), this.options.tint || this.showHideWindow("hide"), this.options.showLens && this.showHideLens("hide"), this.options.tint && this.showHideTint("hide")) }, setPosition: function(b) { if (!this.options.zoomEnabled) return !1; this.nzHeight = this.$elem.height(); this.nzWidth = this.$elem.width(); this.nzOffset = this.$elem.offset(); this.options.tint && "inner" != this.options.zoomType && (this.zoomTint.css({ top: 0 }), this.zoomTint.css({ left: 0 })); this.options.responsive && !this.options.scrollZoom && this.options.showLens && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.largeWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.widthRatio = this.largeWidth / this.nzWidth, this.heightRatio = this.largeHeight / this.nzHeight, "lens" != this.options.zoomType && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.options.zoomWindowWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.zoomLens.css("width", lensWidth), this.zoomLens.css("height", lensHeight), this.options.tint && (this.zoomTintImage.css("width", this.nzWidth), this.zoomTintImage.css("height", this.nzHeight))), "lens" == this.options.zoomType && this.zoomLens.css({ width: String(this.options.lensSize) + "px", height: String(this.options.lensSize) + "px" })); this.zoomContainer.css({ top: this.nzOffset.top }); this.zoomContainer.css({ left: this.nzOffset.left }); this.mouseLeft = parseInt(b.pageX - this.nzOffset.left); this.mouseTop = parseInt(b.pageY - this.nzOffset.top); "window" == this.options.zoomType && (this.Etoppos = this.mouseTop < this.zoomLens.height() / 2, this.Eboppos = this.mouseTop > this.nzHeight - this.zoomLens.height() / 2 - 2 * this.options.lensBorderSize, this.Eloppos = this.mouseLeft < 0 + this.zoomLens.width() / 2, this.Eroppos = this.mouseLeft > this.nzWidth - this.zoomLens.width() / 2 - 2 * this.options.lensBorderSize); "inner" == this.options.zoomType && (this.Etoppos = this.mouseTop < this.nzHeight / 2 / this.heightRatio, this.Eboppos = this.mouseTop > this.nzHeight - this.nzHeight / 2 / this.heightRatio, this.Eloppos = this.mouseLeft < 0 + this.nzWidth / 2 / this.widthRatio, this.Eroppos = this.mouseLeft > this.nzWidth - this.nzWidth / 2 / this.widthRatio - 2 * this.options.lensBorderSize); 0 >= this.mouseLeft || 0 > this.mouseTop || this.mouseLeft > this.nzWidth || this.mouseTop > this.nzHeight ? this.setElements("hide") : (this.options.showLens && (this.lensLeftPos = String(this.mouseLeft - this.zoomLens.width() / 2), this.lensTopPos = String(this.mouseTop - this.zoomLens.height() / 2)), this.Etoppos && (this.lensTopPos = 0), this.Eloppos && (this.tintpos = this.lensLeftPos = this.windowLeftPos = 0), "window" == this.options.zoomType && (this.Eboppos && (this.lensTopPos = Math.max(this.nzHeight - this.zoomLens.height() - 2 * this.options.lensBorderSize, 0)), this.Eroppos && (this.lensLeftPos = this.nzWidth - this.zoomLens.width() - 2 * this.options.lensBorderSize)), "inner" == this.options.zoomType && (this.Eboppos && (this.lensTopPos = Math.max(this.nzHeight - 2 * this.options.lensBorderSize, 0)), this.Eroppos && (this.lensLeftPos = this.nzWidth - this.nzWidth - 2 * this.options.lensBorderSize)), "lens" == this.options.zoomType && (this.windowLeftPos = String(-1 * ((b.pageX - this.nzOffset.left) * this.widthRatio - this.zoomLens.width() / 2)), this.windowTopPos = String(-1 * ((b.pageY - this.nzOffset.top) * this.heightRatio - this.zoomLens.height() / 2)), this.zoomLens.css({ backgroundPosition: this.windowLeftPos + "px " + this.windowTopPos + "px" }), this.changeBgSize && (this.nzHeight > this.nzWidth ? ("lens" == this.options.zoomType && this.zoomLens.css({ "background-size": this.largeWidth / this.newvalueheight + "px " + this.largeHeight / this.newvalueheight + "px" }), this.zoomWindow.css({ "background-size": this.largeWidth / this.newvalueheight + "px " + this.largeHeight / this.newvalueheight + "px" })) : ("lens" == this.options.zoomType && this.zoomLens.css({ "background-size": this.largeWidth / this.newvaluewidth + "px " + this.largeHeight / this.newvaluewidth + "px" }), this.zoomWindow.css({ "background-size": this.largeWidth / this.newvaluewidth + "px " + this.largeHeight / this.newvaluewidth + "px" })), this.changeBgSize = !1), this.setWindowPostition(b)), this.options.tint && "inner" != this.options.zoomType && this.setTintPosition(b), "window" == this.options.zoomType && this.setWindowPostition(b), "inner" == this.options.zoomType && this.setWindowPostition(b), this.options.showLens && (this.fullwidth && "lens" != this.options.zoomType && (this.lensLeftPos = 0), this.zoomLens.css({ left: this.lensLeftPos + "px", top: this.lensTopPos + "px" }))) }, showHideWindow: function(b) { "show" != b || this.isWindowActive || (this.options.zoomWindowFadeIn ? this.zoomWindow.stop(!0, !0, !1).fadeIn(this.options.zoomWindowFadeIn) : this.zoomWindow.show(), this.isWindowActive = !0); "hide" == b && this.isWindowActive && (this.options.zoomWindowFadeOut ? this.zoomWindow.stop(!0, !0).fadeOut(this.options.zoomWindowFadeOut) : this.zoomWindow.hide(), this.isWindowActive = !1) }, showHideLens: function(b) { "show" != b || this.isLensActive || (this.options.lensFadeIn ? this.zoomLens.stop(!0, !0, !1).fadeIn(this.options.lensFadeIn) : this.zoomLens.show(), this.isLensActive = !0); "hide" == b && this.isLensActive && (this.options.lensFadeOut ? this.zoomLens.stop(!0, !0).fadeOut(this.options.lensFadeOut) : this.zoomLens.hide(), this.isLensActive = !1) }, showHideTint: function(b) { "show" != b || this.isTintActive || (this.options.zoomTintFadeIn ? this.zoomTint.css({ opacity: this.options.tintOpacity }).animate().stop(!0, !0).fadeIn("slow") : (this.zoomTint.css({ opacity: this.options.tintOpacity }).animate(), this.zoomTint.show()), this.isTintActive = !0); "hide" == b && this.isTintActive && (this.options.zoomTintFadeOut ? this.zoomTint.stop(!0, !0).fadeOut(this.options.zoomTintFadeOut) : this.zoomTint.hide(), this.isTintActive = !1) }, setLensPostition: function(b) {}, setWindowPostition: function(b) { var a = this; if (isNaN(a.options.zoomWindowPosition)) a.externalContainer = d("#" + a.options.zoomWindowPosition), a.externalContainerWidth = a.externalContainer.width(), a.externalContainerHeight = a.externalContainer.height(), a.externalContainerOffset = a.externalContainer.offset(), a.windowOffsetTop = a.externalContainerOffset.top, a.windowOffsetLeft = a.externalContainerOffset.left; else switch (a.options.zoomWindowPosition) { case 1: a.windowOffsetTop = a.options.zoomWindowOffety; a.windowOffsetLeft = +a.nzWidth; break; case 2: a.options.zoomWindowHeight > a.nzHeight && (a.windowOffsetTop = -1 * (a.options.zoomWindowHeight / 2 - a.nzHeight / 2), a.windowOffsetLeft = a.nzWidth); break; case 3: a.windowOffsetTop = a.nzHeight - a.zoomWindow.height() - 2 * a.options.borderSize; a.windowOffsetLeft = a.nzWidth; break; case 4: a.windowOffsetTop = a.nzHeight; a.windowOffsetLeft = a.nzWidth; break; case 5: a.windowOffsetTop = a.nzHeight; a.windowOffsetLeft = a.nzWidth - a.zoomWindow.width() - 2 * a.options.borderSize; break; case 6: a.options.zoomWindowHeight > a.nzHeight && (a.windowOffsetTop = a.nzHeight, a.windowOffsetLeft = -1 * (a.options.zoomWindowWidth / 2 - a.nzWidth / 2 + 2 * a.options.borderSize)); break; case 7: a.windowOffsetTop = a.nzHeight; a.windowOffsetLeft = 0; break; case 8: a.windowOffsetTop = a.nzHeight; a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize); break; case 9: a.windowOffsetTop = a.nzHeight - a.zoomWindow.height() - 2 * a.options.borderSize; a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize); break; case 10: a.options.zoomWindowHeight > a.nzHeight && (a.windowOffsetTop = -1 * (a.options.zoomWindowHeight / 2 - a.nzHeight / 2), a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize)); break; case 11: a.windowOffsetTop = a.options.zoomWindowOffety; a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize); break; case 12: a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize); a.windowOffsetLeft = -1 * (a.zoomWindow.width() + 2 * a.options.borderSize); break; case 13: a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize); a.windowOffsetLeft = 0; break; case 14: a.options.zoomWindowHeight > a.nzHeight && (a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize), a.windowOffsetLeft = -1 * (a.options.zoomWindowWidth / 2 - a.nzWidth / 2 + 2 * a.options.borderSize)); break; case 15: a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize); a.windowOffsetLeft = a.nzWidth - a.zoomWindow.width() - 2 * a.options.borderSize; break; case 16: a.windowOffsetTop = -1 * (a.zoomWindow.height() + 2 * a.options.borderSize); a.windowOffsetLeft = a.nzWidth; break; default: a.windowOffsetTop = a.options.zoomWindowOffety, a.windowOffsetLeft = a.nzWidth } a.isWindowSet = !0; a.windowOffsetTop += a.options.zoomWindowOffety; a.windowOffsetLeft += a.options.zoomWindowOffetx; a.zoomWindow.css({ top: a.windowOffsetTop }); a.zoomWindow.css({ left: a.windowOffsetLeft }); "inner" == a.options.zoomType && (a.zoomWindow.css({ top: 0 }), a.zoomWindow.css({ left: 0 })); a.windowLeftPos = String(-1 * ((b.pageX - a.nzOffset.left) * a.widthRatio - a.zoomWindow.width() / 2)); a.windowTopPos = String(-1 * ((b.pageY - a.nzOffset.top) * a.heightRatio - a.zoomWindow.height() / 2)); a.Etoppos && (a.windowTopPos = 0); a.Eloppos && (a.windowLeftPos = 0); a.Eboppos && (a.windowTopPos = -1 * (a.largeHeight / a.currentZoomLevel - a.zoomWindow.height())); a.Eroppos && (a.windowLeftPos = -1 * (a.largeWidth / a.currentZoomLevel - a.zoomWindow.width())); a.fullheight && (a.windowTopPos = 0); a.fullwidth && (a.windowLeftPos = 0); if ("window" == a.options.zoomType || "inner" == a.options.zoomType) 1 == a.zoomLock && (1 >= a.widthRatio && (a.windowLeftPos = 0), 1 >= a.heightRatio && (a.windowTopPos = 0)), a.largeHeight < a.options.zoomWindowHeight && (a.windowTopPos = 0), a.largeWidth < a.options.zoomWindowWidth && (a.windowLeftPos = 0), a.options.easing ? (a.xp || (a.xp = 0), a.yp || (a.yp = 0), a.loop || (a.loop = setInterval(function() { a.xp += (a.windowLeftPos - a.xp) / a.options.easingAmount; a.yp += (a.windowTopPos - a.yp) / a.options.easingAmount; a.scrollingLock ? (clearInterval(a.loop), a.xp = a.windowLeftPos, a.yp = a.windowTopPos, a.xp = -1 * ((b.pageX - a.nzOffset.left) * a.widthRatio - a.zoomWindow.width() / 2), a.yp = -1 * ((b.pageY - a.nzOffset.top) * a.heightRatio - a.zoomWindow.height() / 2), a.changeBgSize && (a.nzHeight > a.nzWidth ? ("lens" == a.options.zoomType && a.zoomLens.css({ "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px" }), a.zoomWindow.css({ "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px" })) : ("lens" != a.options.zoomType && a.zoomLens.css({ "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvalueheight + "px" }), a.zoomWindow.css({ "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px" })), a.changeBgSize = !1), a.zoomWindow.css({ backgroundPosition: a.windowLeftPos + "px " + a.windowTopPos + "px" }), a.scrollingLock = !1, a.loop = !1) : (a.changeBgSize && (a.nzHeight > a.nzWidth ? ("lens" == a.options.zoomType && a.zoomLens.css({ "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px" }), a.zoomWindow.css({ "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px" })) : ("lens" != a.options.zoomType && a.zoomLens.css({ "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px" }), a.zoomWindow.css({ "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px" })), a.changeBgSize = !1), a.zoomWindow.css({ backgroundPosition: a.xp + "px " + a.yp + "px" })) }, 16))) : (a.changeBgSize && (a.nzHeight > a.nzWidth ? ("lens" == a.options.zoomType && a.zoomLens.css({ "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px" }), a.zoomWindow.css({ "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px" })) : ("lens" == a.options.zoomType && a.zoomLens.css({ "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px" }), a.largeHeight / a.newvaluewidth < a.options.zoomWindowHeight ? a.zoomWindow.css({ "background-size": a.largeWidth / a.newvaluewidth + "px " + a.largeHeight / a.newvaluewidth + "px" }) : a.zoomWindow.css({ "background-size": a.largeWidth / a.newvalueheight + "px " + a.largeHeight / a.newvalueheight + "px" })), a.changeBgSize = !1), a.zoomWindow.css({ backgroundPosition: a.windowLeftPos + "px " + a.windowTopPos + "px" })) }, setTintPosition: function(b) { this.nzOffset = this.$elem.offset(); this.tintpos = String(-1 * (b.pageX - this.nzOffset.left - this.zoomLens.width() / 2)); this.tintposy = String(-1 * (b.pageY - this.nzOffset.top - this.zoomLens.height() / 2)); this.Etoppos && (this.tintposy = 0); this.Eloppos && (this.tintpos = 0); this.Eboppos && (this.tintposy = -1 * (this.nzHeight - this.zoomLens.height() - 2 * this.options.lensBorderSize)); this.Eroppos && (this.tintpos = -1 * (this.nzWidth - this.zoomLens.width() - 2 * this.options.lensBorderSize)); this.options.tint && (this.fullheight && (this.tintposy = 0), this.fullwidth && (this.tintpos = 0), this.zoomTintImage.css({ left: this.tintpos + "px" }), this.zoomTintImage.css({ top: this.tintposy + "px" })) }, swaptheimage: function(b, a) { var c = this, e = new Image; c.options.loadingIcon && (c.spinner = d("
'), c.$elem.after(c.spinner)); c.options.onImageSwap(c.$elem); e.onload = function() { c.largeWidth = e.width; c.largeHeight = e.height; c.zoomImage = a; c.zoomWindow.css({ "background-size": c.largeWidth + "px " + c.largeHeight + "px" }); c.zoomWindow.css({ "background-size": c.largeWidth + "px " + c.largeHeight + "px" }); c.swapAction(b, a) }; e.src = a }, swapAction: function(b, a) { var c = this, e = new Image; e.onload = function() { c.nzHeight = e.height; c.nzWidth = e.width; c.options.onImageSwapComplete(c.$elem); c.doneCallback() }; e.src = b; c.currentZoomLevel = c.options.zoomLevel; c.options.maxZoomLevel = !1; "lens" == c.options.zoomType && c.zoomLens.css({ backgroundImage: "url('" + a + "')" }); "window" == c.options.zoomType && c.zoomWindow.css({ backgroundImage: "url('" + a + "')" }); "inner" == c.options.zoomType && c.zoomWindow.css({ backgroundImage: "url('" + a + "')" }); c.currentImage = a; if (c.options.imageCrossfade) { var f = c.$elem, g = f.clone(); c.$elem.attr("src", b); c.$elem.after(g); g.stop(!0).fadeOut(c.options.imageCrossfade, function() { d(this).remove() }); c.$elem.width("auto").removeAttr("width"); c.$elem.height("auto").removeAttr("height"); f.fadeIn(c.options.imageCrossfade); c.options.tint && "inner" != c.options.zoomType && (f = c.zoomTintImage, g = f.clone(), c.zoomTintImage.attr("src", a), c.zoomTintImage.after(g), g.stop(!0).fadeOut(c.options.imageCrossfade, function() { d(this).remove() }), f.fadeIn(c.options.imageCrossfade), c.zoomTint.css({ height: c.$elem.height() }), c.zoomTint.css({ width: c.$elem.width() })); c.zoomContainer.css("height", c.$elem.height()); c.zoomContainer.css("width", c.$elem.width()); "inner" != c.options.zoomType || c.options.constrainType || (c.zoomWrap.parent().css("height", c.$elem.height()), c.zoomWrap.parent().css("width", c.$elem.width()), c.zoomWindow.css("height", c.$elem.height()), c.zoomWindow.css("width", c.$elem.width())) } else c.$elem.attr("src", b), c.options.tint && (c.zoomTintImage.attr("src", a), c.zoomTintImage.attr("height", c.$elem.height()), c.zoomTintImage.css({ height: c.$elem.height() }), c.zoomTint.css({ height: c.$elem.height() })), c.zoomContainer.css("height", c.$elem.height()), c.zoomContainer.css("width", c.$elem.width()); c.options.imageCrossfade && (c.zoomWrap.css("height", c.$elem.height()), c.zoomWrap.css("width", c.$elem.width())); c.options.constrainType && ("height" == c.options.constrainType && (c.zoomContainer.css("height", c.options.constrainSize), c.zoomContainer.css("width", "auto"), c.options.imageCrossfade ? (c.zoomWrap.css("height", c.options.constrainSize), c.zoomWrap.css("width", "auto"), c.constwidth = c.zoomWrap.width()) : (c.$elem.css("height", c.options.constrainSize), c.$elem.css("width", "auto"), c.constwidth = c.$elem.width()), "inner" == c.options.zoomType && (c.zoomWrap.parent().css("height", c.options.constrainSize), c.zoomWrap.parent().css("width", c.constwidth), c.zoomWindow.css("height", c.options.constrainSize), c.zoomWindow.css("width", c.constwidth)), c.options.tint && (c.tintContainer.css("height", c.options.constrainSize), c.tintContainer.css("width", c.constwidth), c.zoomTint.css("height", c.options.constrainSize), c.zoomTint.css("width", c.constwidth), c.zoomTintImage.css("height", c.options.constrainSize), c.zoomTintImage.css("width", c.constwidth))), "width" == c.options.constrainType && (c.zoomContainer.css("height", "auto"), c.zoomContainer.css("width", c.options.constrainSize), c.options.imageCrossfade ? (c.zoomWrap.css("height", "auto"), c.zoomWrap.css("width", c.options.constrainSize), c.constheight = c.zoomWrap.height()) : (c.$elem.css("height", "auto"), c.$elem.css("width", c.options.constrainSize), c.constheight = c.$elem.height()), "inner" == c.options.zoomType && (c.zoomWrap.parent().css("height", c.constheight), c.zoomWrap.parent().css("width", c.options.constrainSize), c.zoomWindow.css("height", c.constheight), c.zoomWindow.css("width", c.options.constrainSize)), c.options.tint && (c.tintContainer.css("height", c.constheight), c.tintContainer.css("width", c.options.constrainSize), c.zoomTint.css("height", c.constheight), c.zoomTint.css("width", c.options.constrainSize), c.zoomTintImage.css("height", c.constheight), c.zoomTintImage.css("width", c.options.constrainSize)))) }, doneCallback: function() { this.options.loadingIcon && this.spinner.hide(); this.nzOffset = this.$elem.offset(); this.nzWidth = this.$elem.width(); this.nzHeight = this.$elem.height(); this.currentZoomLevel = this.options.zoomLevel; this.widthRatio = this.largeWidth / this.nzWidth; this.heightRatio = this.largeHeight / this.nzHeight; "window" == this.options.zoomType && (lensHeight = this.nzHeight < this.options.zoomWindowWidth / this.widthRatio ? this.nzHeight : String(this.options.zoomWindowHeight / this.heightRatio), lensWidth = this.options.zoomWindowWidth < this.options.zoomWindowWidth ? this.nzWidth : this.options.zoomWindowWidth / this.widthRatio, this.zoomLens && (this.zoomLens.css("width", lensWidth), this.zoomLens.css("height", lensHeight))) }, getCurrentImage: function() { return this.zoomImage }, getGalleryList: function() { var b = this; b.gallerylist = []; b.options.gallery ? d("#" + b.options.gallery + " a").each(function() { var a = ""; d(this).data("zoom-image") ? a = d(this).data("zoom-image") : d(this).data("image") && (a = d(this).data("image")); a == b.zoomImage ? b.gallerylist.unshift({ href: "" + a + "", title: d(this).find("img").attr("title"), type: 'image' }) : b.gallerylist.push({ href: "" + a + "", title: d(this).find("img").attr("title"), type: 'image' }) }) : b.gallerylist.push({ href: "" + b.zoomImage + "", title: d(this).find("img").attr("title"), type: 'image' }); return b.gallerylist }, changeZoomLevel: function(b) { this.scrollingLock = !0; this.newvalue = parseFloat(b).toFixed(2); newvalue = parseFloat(b).toFixed(2); maxheightnewvalue = this.largeHeight / (this.options.zoomWindowHeight / this.nzHeight * this.nzHeight); maxwidthtnewvalue = this.largeWidth / (this.options.zoomWindowWidth / this.nzWidth * this.nzWidth); "inner" != this.options.zoomType && (maxheightnewvalue <= newvalue ? (this.heightRatio = this.largeHeight / maxheightnewvalue / this.nzHeight, this.newvalueheight = maxheightnewvalue, this.fullheight = !0) : (this.heightRatio = this.largeHeight / newvalue / this.nzHeight, this.newvalueheight = newvalue, this.fullheight = !1), maxwidthtnewvalue <= newvalue ? (this.widthRatio = this.largeWidth / maxwidthtnewvalue / this.nzWidth, this.newvaluewidth = maxwidthtnewvalue, this.fullwidth = !0) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1), "lens" == this.options.zoomType && (maxheightnewvalue <= newvalue ? (this.fullwidth = !0, this.newvaluewidth = maxheightnewvalue) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1))); "inner" == this.options.zoomType && (maxheightnewvalue = parseFloat(this.largeHeight / this.nzHeight).toFixed(2), maxwidthtnewvalue = parseFloat(this.largeWidth / this.nzWidth).toFixed(2), newvalue > maxheightnewvalue && (newvalue = maxheightnewvalue), newvalue > maxwidthtnewvalue && (newvalue = maxwidthtnewvalue), maxheightnewvalue <= newvalue ? (this.heightRatio = this.largeHeight / newvalue / this.nzHeight, this.newvalueheight = newvalue > maxheightnewvalue ? maxheightnewvalue : newvalue, this.fullheight = !0) : (this.heightRatio = this.largeHeight / newvalue / this.nzHeight, this.newvalueheight = newvalue > maxheightnewvalue ? maxheightnewvalue : newvalue, this.fullheight = !1), maxwidthtnewvalue <= newvalue ? (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue > maxwidthtnewvalue ? maxwidthtnewvalue : newvalue, this.fullwidth = !0) : (this.widthRatio = this.largeWidth / newvalue / this.nzWidth, this.newvaluewidth = newvalue, this.fullwidth = !1)); scrcontinue = !1; "inner" == this.options.zoomType && (this.nzWidth > this.nzHeight && (this.newvaluewidth <= maxwidthtnewvalue ? scrcontinue = !0 : (scrcontinue = !1, this.fullwidth = this.fullheight = !0)), this.nzHeight > this.nzWidth && (this.newvaluewidth <= maxwidthtnewvalue ? scrcontinue = !0 : (scrcontinue = !1, this.fullwidth = this.fullheight = !0))); "inner" != this.options.zoomType && (scrcontinue = !0); scrcontinue && (this.zoomLock = 0, this.changeZoom = !0, this.options.zoomWindowHeight / this.heightRatio <= this.nzHeight && (this.currentZoomLevel = this.newvalueheight, "lens" != this.options.zoomType && "inner" != this.options.zoomType && (this.changeBgSize = !0, this.zoomLens.css({ height: String(this.options.zoomWindowHeight / this.heightRatio) + "px" })), "lens" == this.options.zoomType || "inner" == this.options.zoomType) && (this.changeBgSize = !0), this.options.zoomWindowWidth / this.widthRatio <= this.nzWidth && ("inner" != this.options.zoomType && this.newvaluewidth > this.newvalueheight && (this.currentZoomLevel = this.newvaluewidth), "lens" != this.options.zoomType && "inner" != this.options.zoomType && (this.changeBgSize = !0, this.zoomLens.css({ width: String(this.options.zoomWindowWidth / this.widthRatio) + "px" })), "lens" == this.options.zoomType || "inner" == this.options.zoomType) && (this.changeBgSize = !0), "inner" == this.options.zoomType && (this.changeBgSize = !0, this.nzWidth > this.nzHeight && (this.currentZoomLevel = this.newvaluewidth), this.nzHeight > this.nzWidth && (this.currentZoomLevel = this.newvaluewidth))); this.setPosition(this.currentLoc) }, closeAll: function() { self.zoomWindow && self.zoomWindow.hide(); self.zoomLens && self.zoomLens.hide(); self.zoomTint && self.zoomTint.hide() }, changeState: function(b) { "enable" == b && (this.options.zoomEnabled = !0); "disable" == b && (this.options.zoomEnabled = !1) } }; d.fn.elevateZoom = function(b) { return this.each(function() { var a = Object.create(k); a.init(b, this); d.data(this, "elevateZoom", a) }) }; d.fn.elevateZoom.options = { zoomActivation: "hover", zoomEnabled: !0, preloading: 1, zoomLevel: 1, scrollZoom: !1, scrollZoomIncrement: 0.1, minZoomLevel: !1, maxZoomLevel: !1, easing: !1, easingAmount: 12, lensSize: 200, zoomWindowWidth: 400, zoomWindowHeight: 400, zoomWindowOffetx: 0, zoomWindowOffety: 0, zoomWindowPosition: 1, zoomWindowBgColour: "#fff", lensFadeIn: !1, lensFadeOut: !1, debug: !1, zoomWindowFadeIn: !1, zoomWindowFadeOut: !1, zoomWindowAlwaysShow: !1, zoomTintFadeIn: !1, zoomTintFadeOut: !1, borderSize: 4, showLens: !0, borderColour: "#888", lensBorderSize: 1, lensBorderColour: "#000", lensShape: "square", zoomType: "window", containLensZoom: !1, lensColour: "white", lensOpacity: 0.4, lenszoom: !1, tint: !1, tintColour: "#333", tintOpacity: 0.4, gallery: !1, galleryActiveClass: "zoomGalleryActive", imageCrossfade: !1, constrainType: !1, constrainSize: !1, loadingIcon: !1, cursor: "default", responsive: !0, onComplete: d.noop, onZoomedImageLoaded: function() {}, onImageSwap: d.noop, onImageSwapComplete: d.noop } })(jQuery, window, document);/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0
',image:'',iframe:'",error:'

The requested content cannot be loaded.
Please try again later.

',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin, outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}", g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),cz||y>r)&&(c>m&&j>u)&&!(19n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&jz||y>r)&&c>m&&j>u;c=h.aspectRatio?cu&&j
').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"=== f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d= b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('
'+e+"
");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('
').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('
').appendTo("body");var e=20=== d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery);var matched, browser; jQuery.uaMatch = function( ua ) { ua = ua.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || /(webkit)[ \/]([\w.]+)/.exec( ua ) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || /(msie) ([\w.]+)/.exec( ua ) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || []; return { browser: match[ 1 ] || "", version: match[ 2 ] || "0" }; }; matched = jQuery.uaMatch( navigator.userAgent ); browser = {}; if ( matched.browser ) { browser[ matched.browser ] = true; browser.version = matched.version; } // Chrome is Webkit, but Webkit is also Safari. if ( browser.chrome ) { browser.webkit = true; } else if ( browser.webkit ) { browser.safari = true; } jQuery.browser = browser; ; (function ($) { $.fn.extend({ autocomplete: function (b, d) { var c = typeof b == "string"; d = $.extend({}, $.Autocompleter.defaults, { url: c ? b: null, data: c ? null: b, delay: c ? $.Autocompleter.defaults.delay: 10, max: d && !d.scroll ? 10 : 150 }, d); d.highlight = d.highlight || function (a) { return a }; d.formatMatch = d.formatMatch || d.formatItem; return this.each(function () { new $.Autocompleter(this, d) }) }, result: function (a) { return this.bind("result", a) }, search: function (a) { return this.trigger("search", [a]) }, flushCache: function () { return this.trigger("flushCache") }, setOptions: function (a) { return this.trigger("setOptions", [a]) }, unautocomplete: function () { return this.trigger("unautocomplete") } }); $.Autocompleter = function (o, r) { var t = { UP: 38, DOWN: 40, DEL: 46, TAB: 9, RETURN: 13, ESC: 27, COMMA: 188, PAGEUP: 33, PAGEDOWN: 34, BACKSPACE: 8 }; var u = $(o).attr("autocomplete", "off").addClass(r.inputClass); var p; var m = ""; var n = $.Autocompleter.Cache(r); var s = 0; var k; var h = { mouseDownOnSelect: false }; var l = $.Autocompleter.Select(r, o, selectCurrent, h); var j; $.browser.opera && $(o.form).bind("submit.autocomplete", function () { if (j) { j = false; return false } }); u.bind(($.browser.opera ? "keypress": "keydown") + ".autocomplete", function (a) { s = 1; k = a.keyCode; switch (a.keyCode) { case t.UP: a.preventDefault(); if (l.visible()) { l.prev() } else { onChange(0, true) } break; case t.DOWN: a.preventDefault(); if (l.visible()) { l.next() } else { onChange(0, true) } break; case t.PAGEUP: a.preventDefault(); if (l.visible()) { l.pageUp() } else { onChange(0, true) } break; case t.PAGEDOWN: a.preventDefault(); if (l.visible()) { l.pageDown() } else { onChange(0, true) } break; case r.multiple && $.trim(r.multipleSeparator) == "," && t.COMMA: case t.TAB: case t.RETURN: if (selectCurrent()) { a.preventDefault(); j = true; return false } break; case t.ESC: l.hide(); break; default: clearTimeout(p); p = setTimeout(onChange, r.delay); break } }).focus(function () { s++ }).blur(function () { s = 0; if (!h.mouseDownOnSelect) { hideResults() } }).click(function () { if (s++>1 && !l.visible()) { onChange(0, true) } }).bind("search", function () { var c = (arguments.length > 1) ? arguments[1] : null; function findValueCallback(q, a) { var b; if (a && a.length) { for (var i = 0; i < a.length; i++) { if (a[i].result.toLowerCase() == q.toLowerCase()) { b = a[i]; break } } } if (typeof c == "function") c(b); else u.trigger("result", b && [b.data, b.value]) } $.each(trimWords(u.val()), function (i, a) { request(a, findValueCallback, findValueCallback) }) }).bind("flushCache", function () { n.flush() }).bind("setOptions", function () { $.extend(r, arguments[1]); if ("data" in arguments[1]) n.populate() }).bind("unautocomplete", function () { l.unbind(); u.unbind(); $(o.form).unbind(".autocomplete") }); function selectCurrent() { var e = l.selected(); if (!e) return false; var v = e.result; m = v; if (r.multiple) { var b = trimWords(u.val()); if (b.length > 1) { var f = r.multipleSeparator.length; var c = $(o).selection().start; var d, progress = 0; $.each(b, function (i, a) { progress += a.length; if (c <= progress) { d = i; return false } progress += f }); b[d] = v; v = b.join(r.multipleSeparator) } v += r.multipleSeparator } u.val(v); hideResultsNow(); u.trigger("result", [e.data, e.value]); $(u).closest("form").submit(); return true } function onChange(b, c) { if (k == t.DEL) { l.hide(); return } var a = u.val(); if (!c && a == m) return; m = a; a = lastWord(a); if (a.length >= r.minChars) { u.addClass(r.loadingClass); if (!r.matchCase) a = a.toLowerCase(); request(a, receiveData, hideResultsNow) } else { stopLoading(); l.hide() } }; function trimWords(b) { if (!b) return [""]; if (!r.multiple) return [$.trim(b)]; return $.map(b.split(r.multipleSeparator), function (a) { return $.trim(b).length ? $.trim(a) : null }) } function lastWord(a) { if (!r.multiple) return a; var c = trimWords(a); if (c.length == 1) return c[0]; var b = $(o).selection().start; if (b == a.length) { c = trimWords(a) } else { c = trimWords(a.replace(a.substring(b), "")) } return c[c.length - 1] } function autoFill(q, a) { if (r.autoFill && (lastWord(u.val()).toLowerCase() == q.toLowerCase()) && k != t.BACKSPACE) { u.val(u.val() + a.substring(lastWord(m).length)); $(o).selection(m.length, m.length + a.length) } }; function hideResults() { clearTimeout(p); p = setTimeout(hideResultsNow, 200) }; function hideResultsNow() { var c = l.visible(); l.hide(); clearTimeout(p); stopLoading(); if (r.mustMatch) { u.search(function (a) { if (!a) { if (r.multiple) { var b = trimWords(u.val()).slice(0, -1); u.val(b.join(r.multipleSeparator) + (b.length ? r.multipleSeparator: "")) } else { u.val(""); u.trigger("result", null) } } }) } }; function receiveData(q, a) { if (a && a.length && s) { stopLoading(); l.display(a, q); autoFill(q, a[0].value); l.show() } else { hideResultsNow() } }; function request(f, d, g) { if (!r.matchCase) f = f.toLowerCase(); var e = n.load(f); if (e && e.length) { d(f, e) } else if ((typeof r.url == "string") && (r.url.length > 0)) { var c = { timestamp: +new Date() }; $.each(r.extraParams, function (a, b) { c[a] = typeof b == "function" ? b() : b }); $.ajax({ mode: "abort", port: "autocomplete" + o.name, dataType: r.dataType, url: r.url, data: $.extend({ q: lastWord(f), limit: r.max }, c), success: function (a) { var b = r.parse && r.parse(a) || parse(a); n.add(f, b); d(f, b) } }) } else { l.emptyList(); g(f) } }; function parse(c) { var d = []; var b = c.split("\n"); for (var i = 0; i < b.length; i++) { var a = $.trim(b[i]); if (a) { a = a.split("|"); d[d.length] = { data: a, value: a[0], result: r.formatResult && r.formatResult(a, a[0]) || a[0] } } } return d }; function stopLoading() { u.removeClass(r.loadingClass) } }; $.Autocompleter.defaults = { inputClass: "ac_input", resultsClass: "ac_results", loadingClass: "ac_loading", minChars: 1, delay: 400, matchCase: false, matchSubset: true, matchContains: false, cacheLength: 10, max: 100, mustMatch: false, extraParams: {}, selectFirst: true, formatItem: function (a) { return a[0] }, formatMatch: null, autoFill: false, width: 0, multiple: false, multipleSeparator: ", ", highlight: function (b, a) { return b.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + a.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1") }, scroll: true, scrollHeight: 180 }; $.Autocompleter.Cache = function (g) { var h = {}; var j = 0; function matchSubset(s, a) { if (!g.matchCase) s = s.toLowerCase(); var i = s.indexOf(a); if (g.matchContains == "word") { i = s.toLowerCase().search("\\b" + a.toLowerCase()) } if (i == -1) return false; return i == 0 || g.matchContains }; function add(q, a) { if (j > g.cacheLength) { flush() } if (!h[q]) { j++ } h[q] = a } function populate() { if (!g.data) return false; var f = {}, nullData = 0; if (!g.url) g.cacheLength = 1; f[""] = []; for (var i = 0, ol = g.data.length; i < ol; i++) { var c = g.data[i]; c = (typeof c == "string") ? [c] : c; var d = g.formatMatch(c, i + 1, g.data.length); if (d === false) continue; var e = d.charAt(0).toLowerCase(); if (!f[e]) f[e] = []; var b = { value: d, data: c, result: g.formatResult && g.formatResult(c) || d }; f[e].push(b); if (nullData++ 0) { var c = h[k]; $.each(c, function (i, x) { if (matchSubset(x.value, q)) { a.push(x) } }) } } return a } else if (h[q]) { return h[q] } else if (g.matchSubset) { for (var i = q.length - 1; i >= g.minChars; i--) { var c = h[q.substr(0, i)]; if (c) { var a = []; $.each(c, function (i, x) { if (matchSubset(x.value, q)) { a[a.length] = x } }); return a } } } return null } } }; $.Autocompleter.Select = function (e, g, f, k) { var h = { ACTIVE: "ac_over" }; var j, active = -1, data, term = "", needsInit = true, element, list; function init() { if (!needsInit) return; element = $("
").hide().addClass(e.resultsClass).css("position", "absolute").appendTo(document.body); list = $("
    ").appendTo(element).mouseover(function (a) { if (target(a).nodeName && target(a).nodeName.toUpperCase() == 'LI') { active = $("li", list).removeClass(h.ACTIVE).index(target(a)); $(target(a)).addClass(h.ACTIVE) } }).click(function (a) { $(target(a)).addClass(h.ACTIVE); f(); g.focus(); return false }).mousedown(function () { k.mouseDownOnSelect = true }).mouseup(function () { k.mouseDownOnSelect = false }); if (e.width > 0) element.css("width", e.width); needsInit = false } function target(a) { var b = a.target; while (b && b.tagName != "LI") b = b.parentNode; if (!b) return []; return b } function moveSelect(b) { j.slice(active, active + 1).removeClass(h.ACTIVE); movePosition(b); var a = j.slice(active, active + 1).addClass(h.ACTIVE); if (e.scroll) { var c = 0; j.slice(0, active).each(function () { c += this.offsetHeight }); if ((c + a[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) { list.scrollTop(c + a[0].offsetHeight - list.innerHeight()) } else if (c < list.scrollTop()) { list.scrollTop(c) } } }; function movePosition(a) { active += a; if (active < 0) { active = j.size() - 1 } else if (active >= j.size()) { active = 0 } } function limitNumberOfItems(a) { return e.max && e.max < a ? e.max: a } function fillList() { list.empty(); var b = limitNumberOfItems(data.length); for (var i = 0; i < b; i++) { if (!data[i]) continue; var a = e.formatItem(data[i].data, i + 1, b, data[i].value, term); if (a === false) continue; var c = $("
  • ").html(e.highlight(a, term)).addClass(i % 2 == 0 ? "ac_even": "ac_odd").appendTo(list)[0]; $.data(c, "ac_data", data[i]) } j = list.find("li"); if (e.selectFirst) { j.slice(0, 1).addClass(h.ACTIVE); active = 0 } if ($.fn.bgiframe) list.bgiframe() } return { display: function (d, q) { init(); data = d; term = q; fillList() }, next: function () { moveSelect(1) }, prev: function () { moveSelect( - 1) }, pageUp: function () { if (active != 0 && active - 8 < 0) { moveSelect( - active) } else { moveSelect( - 8) } }, pageDown: function () { if (active != j.size() - 1 && active + 8 > j.size()) { moveSelect(j.size() - 1 - active) } else { moveSelect(8) } }, hide: function () { element && element.hide(); j && j.removeClass(h.ACTIVE); active = -1 }, visible: function () { return element && element.is(":visible") }, current: function () { return this.visible() && (j.filter("." + h.ACTIVE)[0] || e.selectFirst && j[0]) }, show: function () { var a = $(g).offset(); element.css({ width: typeof e.width == "string" || e.width > 0 ? e.width: $(g).width(), top: a.top + g.offsetHeight, left: a.left }).show(); if (e.scroll) { list.scrollTop(0); list.css({ maxHeight: e.scrollHeight, overflow: 'auto' }); if ($.browser.msie && typeof document.body.style.maxHeight === "undefined") { var c = 0; j.each(function () { c += this.offsetHeight }); var b = c > e.scrollHeight; list.css('height', b ? e.scrollHeight: c); if (!b) { j.width(list.width() - parseInt(j.css("padding-left")) - parseInt(j.css("padding-right"))) } } } }, selected: function () { var a = j && j.filter("." + h.ACTIVE).removeClass(h.ACTIVE); return a && a.length && $.data(a[0], "ac_data") }, emptyList: function () { list && list.empty() }, unbind: function () { element && element.remove() } } }; $.fn.selection = function (b, f) { if (b !== undefined) { return this.each(function () { if (this.createTextRange) { var a = this.createTextRange(); if (f === undefined || b == f) { a.move("character", b); a.select() } else { a.collapse(true); a.moveStart("character", b); a.moveEnd("character", f); a.select() } } else if (this.setSelectionRange) { this.setSelectionRange(b, f) } else if (this.selectionStart) { this.selectionStart = b; this.selectionEnd = f } }) } var c = this[0]; if (c.createTextRange) { var e = document.selection.createRange(), orig = c.value, teststring = "<->", textLength = e.text.length; e.text = teststring; var d = c.value.indexOf(teststring); c.value = orig; this.selection(d, d + textLength); return { start: d, end: d + textLength } } else if (c.selectionStart !== undefined) { return { start: c.selectionStart, end: c.selectionEnd } } } })(jQuery);//Tooltipster 1.2 | 9/15/12 | by Caleb Jacob (function(a){a.fn.tooltipster=function(b){function d(b){if(c.animation=="slide"){a(b).slideUp(c.speed,function(){a(b).remove();a("body").css("overflow-x","auto")})}else{a(b).fadeOut(c.speed,function(){a(b).remove();a("body").css("overflow-x","auto")})}}var c=a.extend({animation:"fade",arrow:true,arrowColor:"",delay:200,fixedWidth:0,followMouse:false,offsetX:0,offsetY:0,overrideText:"",position:"top",speed:100,timer:0,tooltipTheme:".tooltip-message"},b);return this.hover(function(){if(a(c.tooltipTheme).not(".tooltip-kill").length==1){d(a(c.tooltipTheme).not(".tooltip-kill"));a(c.tooltipTheme).not(".tooltip-kill").addClass("tooltip-kill")}a("body").css("overflow-x","hidden");var b=a(this).attr("title");a(this).attr("title","");a(this).data("title",b);if(a.trim(c.overrideText).length>0){var b=c.overrideText}if(c.fixedWidth>0){var e=' style="width:'+c.fixedWidth+'px;"'}else{var e=""}a('
    '+b+"
    ").appendTo("body").hide();if(c.followMouse==false){var f=a(window).width();var g=a(this).outerWidth(false);var h=a(this).outerHeight(false);var i=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var j=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var k=a(this).offset();if(c.fixedWidth==0){a(c.tooltipTheme).not(".tooltip-kill").css({width:i+"px","padding-left":"0px","padding-right":"0px"})}function l(){var b=a(window).scrollLeft();if(n-b<0){var d=n-b;n=b;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition",d)}if(n+i-b>f){var d=n-(f+b-i);n=f+b-i;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition",d)}}if(c.position=="top"){var m=k.left+i-(k.left+a(this).outerWidth(false));var n=k.left+c.offsetX-m/2;var o=k.top-j-c.offsetY-10;l();if(k.top-j-c.offsetY-11<0){var o=0}}if(c.position=="top-left"){var n=k.left+c.offsetX;var o=k.top-j-c.offsetY-10;l()}if(c.position=="top-right"){var n=k.left+g+c.offsetX-i;var o=k.top-j-c.offsetY-10;l()}if(c.position=="bottom"){var m=k.left+i+c.offsetX-(k.left+a(this).outerWidth(false));var n=k.left-m/2;var o=k.top+h+c.offsetY+10;l()}if(c.position=="bottom-left"){var n=k.left+c.offsetX;var o=k.top+h+c.offsetY+10;l()}if(c.position=="bottom-right"){var n=k.left+g+c.offsetX-i;var o=k.top+h+c.offsetY+10;l()}if(c.position=="left"){var n=k.left-c.offsetX-i-10;var p=k.left+c.offsetX+g+10;var q=k.top+j+c.offsetY-(k.top+a(this).outerHeight(false));var o=k.top-q/2;if(n<0&&p+i>f){n=n+i}if(n<0){var n=k.left+c.offsetX+g+10;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition","left")}}if(c.position=="right"){var n=k.left+c.offsetX+g+10;var p=k.left-c.offsetX-i-10;var q=k.top+j+c.offsetY-(k.top+a(this).outerHeight(false));var o=k.top-q/2;if(n+i>f&&p<0){n=f-i}if(n+i>f){n=k.left-c.offsetX-i-10;a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition","right")}}}if(c.followMouse==true){var i=a(c.tooltipTheme).not(".tooltip-kill").outerWidth(false);var j=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);var r=a(c.tooltipTheme).not(".tooltip-kill").find(".tooltip-message-content").html();a(this).mousemove(function(b){a(c.tooltipTheme).not(".tooltip-kill").find(".tooltip-message-content").html("").html(r);var d=a(c.tooltipTheme).not(".tooltip-kill").outerHeight(false);if(c.position=="top"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-1-i/2+c.offsetX+"px",top:b.pageY-d-2-c.offsetY-10+"px"})}if(c.position=="top-right"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-8+c.offsetX+"px",top:b.pageY-d-2-c.offsetY-10+"px"})}if(c.position=="top-left"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-i+c.offsetX+7+"px",top:b.pageY-d-2-c.offsetY-10+"px"})}if(c.position=="bottom"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-i/2+c.offsetX-1+"px",top:b.pageY+15+c.offsetY+10+"px"})}if(c.position=="bottom-right"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-2+c.offsetX+"px",top:b.pageY+15+c.offsetY+10+"px"})}if(c.position=="bottom-left"){a(c.tooltipTheme).not(".tooltip-kill").css({left:b.pageX-i+c.offsetX+12+"px",top:b.pageY+15+c.offsetY+10+"px"})}})}if(c.arrow==true){var s="tooltip-arrow-"+c.position;if(c.followMouse==true){if(s.search("right")>0){var t=s;s=t.replace("right","left")}else{var t=s;s=t.replace("left","right")}}if(s=="tooltip-arrow-right"){var u="â—€";var v="top:"+(j/2-5)+"px"}if(s=="tooltip-arrow-left"){var u="â–¶";var v="top:"+(j/2-4)+"px"}if(s.search("top")>0){var u="▼"}if(s.search("bottom")>0){var u="â–²"}if(c.arrowColor.length<1){var w=a(c.tooltipTheme).not(".tooltip-kill").css("background-color")}else{var w=c.arrowColor}var x=a(c.tooltipTheme).not(".tooltip-kill").data("arrow-reposition");if(!x){x=""}else if(x=="left"){s="tooltip-arrow-right";u="â—€";x=""}else if(x=="right"){s="tooltip-arrow-left";u="â–¶";x=""}else{x="left:"+x+"px;"}var y='
    '+u+"
    "}else{var y=""}a(c.tooltipTheme).not(".tooltip-kill").css({top:o+"px",left:n+"px"}).append(y);if(c.animation=="slide"){a(c.tooltipTheme).not(".tooltip-kill").delay(c.delay).slideDown(c.speed,function(){a(".tooltip-arrow").fadeIn(c.speed)});if(c.timer>0){a(c.tooltipTheme).not(".tooltip-kill").delay(c.timer).slideUp(c.speed)}}else{a(".tooltip-arrow").show();a(c.tooltipTheme).not(".tooltip-kill").delay(c.delay).fadeIn(c.speed);if(c.timer>0){a(c.tooltipTheme).not(".tooltip-kill").delay(c.timer).fadeOut(c.speed)}}},function(){a(c.tooltipTheme).not(".tooltip-kill").clearQueue();tooltip_text=a(this).data("title");a(this).attr("title",tooltip_text);a(c.tooltipTheme).addClass("tooltip-kill");d(".tooltip-kill")})}})(jQuery);(function( $ ){ $.fn.reviewPassword = function( options ) { var settings = $.extend(true, { 'crackSpeed' : 200000000, 'tipSpace': 3, 'preventWeakSubmit': false, 'minValues': { 'size': 5, 'uniqueChars': 4, 'letters': 3, 'numbers': 1, 'specChars': 1, 'altCase': 0 } }, options); var internals = { tests : [ { "test": function ( str ) {return {'passed':str.length>=settings.minValues.size, 'found':false}; }, "error": "Your password is too short.", "details": "Use at least "+settings.minValues.size+" characters.", "type": "size", "size": 0 }, { "test": function ( str ) { var chars = new Object(); uniq = 0; for(x = 0; x < str.length; x++) { i = str.charAt(x); if (isNaN(chars[i])) { chars[i] =1 ; uniq++; } } return {'passed':uniq>=settings.minValues.uniqueChars, 'found':false}; }, "error": "The password is too uniform.", "details": "Use at least "+settings.minValues.uniqueChars+" unique characters.", "type": "uniqueChars", "size": 0 }, { "test": /[A-Za-z]/g, "error": "Add more alphabetic letters.", "details": "Use at least "+settings.minValues.letters+" letters.", "type": "letters", "size": 26 }, { "test": /\d/g, "error": "Add more numbers to strengthen your password.", "details": "For example: 'DuBEn748' instead of 'DuBEn'.", "type": "numbers", "size": 10 }, { "test": /[^A-Za-z0-9]/g, "error": "Add more special characters to strengthen your password.", "details": "For example: 'aLkyj%637*' instead of 'aLkyj637'.", "type": "specChars", "size":30 }, { "test": /[a-z][A-Z]|[A-Z][a-z]/g, "error": "Use alternating character case.", "details": "For example: 'TAmBoRin$31E' instead of 'tamborin$31e'.", "type": "altCase", "size": 26 } ], init: function ( options, passField ) { this.meta = this.buildPlugin(); this.passField = passField; passField.keyup($.proxy(this.review, this)); passField.focusin($.proxy(function (evt) {this.meta.plugin.fadeIn(100); this.passField.trigger('keyup');}, this)); passField.focusout($.proxy(function (evt) {this.meta.plugin.fadeOut(100)}, this)); if (settings.preventWeakSubmit) { passField.closest('form').submit($.proxy(function () { if (!this.data("reviewData").approved) { this.focus(); return false; } },this.passField)); } }, buildPlugin: function () { var meta = {"global":{} ,"level":{} , "stats":{}, "error": {}}; meta.plugin = $( '
    ', { 'class':'passTip', 'style':"display:none;"}); meta.plugin.append($('
    ', { 'class':'tri'})); var container = $('
    ', { 'class':'container round'}); container.append($('').html(lang_sifreGuvenligi + ":")); var qmeter = $('
    ', { 'class':'qmeter round'}); meta.level.bar = $('
    ', { 'class':'level round weak', style:'width:0%'}); meta.level.status = $('', {'class':'status'}).html("Weak"); qmeter.append(meta.level.bar).append(meta.level.status); container.append(qmeter); //container.append($('').html("Strength (entropy): ")); meta.stats.entropy = $('').html("0 bits."); //container.append(meta.stats.entropy); //container.append($('
    ')); //container.append($('').html("Bruteforce time: ")); meta.stats.bruteTime = $('').html(""); //container.append(meta.stats.bruteTime); var err = $('
    ', { 'class':'error round'}); meta.error.data = $(''); meta.error.details = $(''); err.append(meta.error.data).append($('
    ')).append(meta.error.details); //container.append(err); meta.plugin.append(container); $("body").append(meta.plugin); return meta; }, update: function () { var stat = this.meta.level.status; var bar = this.meta.level.bar; var entropy = this.data.entropy; this.meta.plugin.css({ "left": this.passField.offset().left+this.passField.width()+ settings.tipSpace, "top": this.passField.offset().top-27 }); this.meta.stats.entropy.html(this.data.entropy+(this.data.entropy==1? " bit." :" bits.")); this.meta.stats.bruteTime.html(this.data.bruteTime+"."); if (!this.data.ftest) this.meta.error.data.closest("div").hide(); else { this.meta.error.data.closest("div").show(); this.meta.error.data.html(this.data.ftest.error); this.meta.error.details.html(this.data.ftest.details); } q = this.data.quality*15 + this.data.entropy; q = q<200?q:200; combined = [ { "q": 50, "cls": "vweak", "caption": "1 / 5" }, { "q": 90, "cls": "weak", "caption": "2 / 5" }, { "q": 130, "cls": "good", "caption": "3 / 5" }, { "q": 160, "cls": "strong", "caption": "4 / 5" }, { "q": Infinity, "cls": "excellent", "caption": "5 / 5" }, ]; for (i=0; i<5; i++) { stage = combined[i]; if (q90, data: this.data }); } , humanTime: function ( seconds ) { return ''; var num = 0; unit = ""; if (seconds<1) { return "Less than a second"} else if (seconds<60) { num = Math.round (seconds); unit = " second"} else if (seconds<60*60) { num = Math.round (seconds / 60); unit = " minute"} else if (seconds<60*60*24) { num = Math.round (seconds / (60*60)); unit = " hour"} else if (seconds<60*60*24*30) { num = Math.round (seconds / (60*60*24)); unit = " day"} else if (seconds<60*60*24*30*12) { num = Math.round(seconds/(60*60*24*30)) ; unit = " month"} else if (seconds<60*60*24*30*12*1000) { num = Math.round(seconds/(60*60*24*30*12)) ; unit = " year"} else { return "More than a thousand years"} unit = num==1? unit: unit+"s"; return num + unit; }, review: function ( event ) { this.data = {ftest:false}; var password = this.passField.val(); var matchPat = function ( str, pat, count ) { var matches = str.match(pat); if (!isNaN(matches)) matches = []; if (matches.length>=count) return {'passed': true, 'found': matches.length>0}; else return {'passed': false}; } var symbPool = 0; $.each(this.tests, $.proxy(function ( c, v ) { var result = (typeof(v.test) == "function")? v.test(password) : matchPat(password, v.test, settings.minValues[v.type]); if (result.found) symbPool = symbPool + v.size; if (!result.passed) this.ftest = { error: v.error, details: v.details, type: v.type, num: c }; }, this.data)); var crackSeconds = Math.pow(symbPool,password.length) / (settings.crackSpeed*2); this.data.bruteTime = this.humanTime(crackSeconds); var entropy = Math.round(password.length* (Math.log(symbPool)/Math.log(2))); this.data.entropy = (isNaN(entropy) || entropy==-Infinity)? 0: entropy; this.data.quality = this.data.ftest? (this.tests.length-this.data.ftest.num-1): this.tests.length; this.update(); } }; internals.tests = internals.tests.reverse(); internals.init(settings, this); }; })( jQuery ); /* http://keith-wood.name/keypad.html Keypad field entry extension for jQuery v1.4.2. Written by Keith Wood (kbwood{at}iinet.com.au) August 2008. Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. Please attribute the author if you use it. */ eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(v($){4 t=\'6\';v 1n(){2.T=D;2.X=[];2.17=E;2.2d=0;2.1E=[];2.R(\'2e\',\'4i\',v(a){$.6.T=(a.Y?a:$.6.T);$.6.11()});2.R(\'2f\',\'2U\',v(a){$.6.2V(a)});2.R(\'2g\',\'4j\',v(a){$.6.2W(a)});2.R(\'2X\',\'4k\',v(a){$.6.2Y(a)});2.R(\'2Z\',\'4l\',v(a){$.6.1o(a,\' \')},P);2.R(\'18\',\'30\');2.R(\'19\',\'4m-30\');2.R(\'31\',\'4n\',v(a){$.6.1o(a,\'\\4o\')},P);2.R(\'33\',\'34\',v(a){$.6.1o(a,\'\\4p\')},P);2.35=[\'36\',\'37\',\'38\'];2.39=[\'!@#$%^&*()2h=\'+2.19+2.18+2.2e,2.19+\'`~[]{}<>\\\\|/\'+2.18+\'3a\',\'36\\\'"\'+2.19+\'3b\',2.19+\'37;:\'+2.18+\'3c\',2.18+\'38,.?\'+2.18+2.19+\'-0+\',\'\'+2.33+2.31+2.2Z+2.2X+2.19+2.2g+2.2f];2.2i=[];2.2i[\'\']={3d:\'...\',3e:\'4q 1F 6\',4r:\'3f\',4s:\'3f 1F 6\',4t:\'4u\',4v:\'3g 1G 1F 1p\',4w:\'4x\',4y:\'3g 1F 4z 2j\',4A:\'&2k;\',4B:\'4C\',4D:\'4E\',4F:\'4G x\',4H:\'›\',4I:\'4J 34\',4K:\'4L\',4M:\'4N 4O/4P 4Q 4R\',4S:2.35,4T:2.39,1H:2.1H,1I:2.1I,1q:E};2.1J={3h:\'U\',3i:\'\',3j:E,2l:\'2m\',2n:{},2o:\'2p\',3k:\'\',2q:E,3l:\'\',2r:\'\',3m:[\'3c\'+2.2e,\'3b\'+2.2f,\'3a\'+2.2g,2.18+\'0\'],2s:\'\',1r:D,3n:P,3o:E,3p:E,3q:E,3r:E,3s:D,2t:D,3t:D};$.1K(2.1J,2.2i[\'\']);2.1L=$(\'\')}$.1K(1n.3v,{12:\'4U\',1M:\'6-4V\',1N:\'6-4W\',2w:\'6-1s\',13:\'6-3w\',2x:\'6-H\',2y:\'6-4X\',1O:\'6-4Y\',4Z:v(a){2z(2.1J,a||{});x 2},R:v(a,b,c,d){u(2.2d==32){50\'51 32 3x 52 53\';}2[a]=54.55(2.2d++);2.1E.1t({56:2[a],57:a,1f:b,2A:c,3y:d});x 2},3z:v(a,b){4 c=(a.1u.1v()!=\'1g\'&&a.1u.1v()!=\'2B\');4 d={Y:c,B:(c?$(\'\'):$.6.1L),1P:E};d.1w=$.1K({},b||{});2.2C(a,d);2.3A(a,d);u(c){$(a).1s(d.B).2D(\'1Q.6\',v(){d.y.U()});2.1x(d)}G u($(a).1R(\':H\')){2.3B(a)}},2C:v(a,b){b.y=$(!b.Y?a:2.w(b,\'1r\')||\'<1g 1h="1p" Q="\'+2.2y+\'" H="H"/>\');u(b.Y){a=$(a);a.14(\'1g\').1y();u(!2.w(b,\'1r\')){a.1s(b.y)}}},3A:v(d,e){4 f=$(d);u(f.1i(2.12)){x}4 g=2.w(e,\'3k\');4 h=2.w(e,\'1q\');u(g){f[h?\'3C\':\'3D\'](\'<1S Q="\'+2.2w+\'">\'+g+\'\')}u(!e.Y){4 i=2.w(e,\'3h\');u(i==\'U\'||i==\'2E\'){f.U(2.1T).58(2.3E)}u(i==\'I\'||i==\'2E\'){4 j=2.w(e,\'3d\');4 k=2.w(e,\'3e\');4 l=2.w(e,\'3i\');4 m=$(2.w(e,\'3j\')?$(\'<1U 2F="\'+l+\'" 3F="\'+k+\'" 1V="\'+k+\'"/>\'):$(\'\').59(l==\'\'?j:$(\'<1U 2F="\'+l+\'" 3F="\'+k+\'" 1V="\'+k+\'"/>\')));f[h?\'3C\':\'3D\'](m);m.1W(2.13).1Q(v(){u($.6.17&&$.6.1X==d){$.6.11()}G{$.6.1T(d)}x E})}}e.3G=f.K(\'1a\');f.1W(2.12)[2.w(e,\'3n\')?\'K\':\'3H\'](\'1a\',P).2D(\'5a.6\',v(a,b,c){e.1w[b]=c}).2D(\'5b.6\',v(a,b){x 2.w(e,b)});$.V(d,t,e)},5c:v(a){4 b=$(a);u(!b.1i(2.12)){x}4 c=$.V(a,t);u(2.T==c){2.11()}b.1j(\'.\'+2.2w).1y().1Y().1j(\'.\'+2.13).1y().1Y().5d(\'.\'+2.2y).1y();b.3I().5e(\'U\',2.1T).1Z(2.12)[c.3G?\'K\':\'3H\'](\'1a\',P);$.3J(c.y[0],t);$.3J(a,t)},5f:v(b){4 c=$(b);u(!c.1i(2.12)){x}4 d=b.1u.1v();u(d==\'1g\'||d==\'2B\'){b.H=E;c.1j(\'I.\'+2.13).1b(v(){2.H=E}).1Y().1j(\'1U.\'+2.13).N({3K:\'1.0\',3L:\'\'})}G u(d==\'F\'||d==\'1S\'){c.3M(\'.\'+2.2x).1y();4 e=$.V(b,t);e.B.14(\'I\').K(\'H\',\'\')}2.X=$.3N(2.X,v(a){x(a==b?D:a)})},3B:v(b){4 c=$(b);u(!c.1i(2.12)){x}4 d=b.1u.1v();u(d==\'1g\'||d==\'2B\'){b.H=P;c.1j(\'I.\'+2.13).1b(v(){2.H=P}).1Y().1j(\'1U.\'+2.13).N({3K:\'0.5\',3L:\'2G\'})}G u(d==\'F\'||d==\'1S\'){4 e=c.3M(\'.\'+2.1N);4 f=e.2H();4 g={L:0,J:0};e.20().1b(v(){u($(2).N(\'21\')==\'5g\'){g=$(2).2H();x E}});c.5h(\'\');4 h=$.V(b,t);h.B.14(\'I\').K(\'H\',\'H\')}2.X=$.3N(2.X,v(a){x(a==b?D:a)});2.X[2.X.C]=b},3O:v(a){x(a&&$.5i(a,2.X)>-1)},5j:v(a,b,c){4 d=b||{};u(3P b==\'3Q\'){d={};d[b]=c}4 e=$.V(a,t);u(e){u(2.T==e){2.11()}2z(e.1w,d);2.2C($(a),e);2.1x(e)}},1T:v(b){b=b.1r||b;u($.6.3O(b)||$.6.1X==b){x}4 c=$.V(b,t);$.6.11(D,\'\');$.6.1X=b;$.6.1e=$.6.2J(b);$.6.1e[1]+=b.5k;4 d=E;$(b).20().1b(v(){d|=$(2).N(\'21\')==\'3R\';x!d});u(d&&$.S.1A){$.6.1e[0]-=O.15.22;$.6.1e[1]-=O.15.23}4 e={L:$.6.1e[0],J:$.6.1e[1]};$.6.1e=D;c.B.N({21:\'3S\',2v:\'5l\',J:\'-3T\',1c:($.S.1A?\'3T\':\'5m\')});$.6.1x(c);e=$.6.3U(c,e,d);c.B.N({21:(d?\'3R\':\'3S\'),2v:\'3u\',L:e.L+\'1k\',J:e.J+\'1k\'});4 f=$.6.w(c,\'2l\');4 g=$.6.w(c,\'2o\');g=(g==\'2p\'&&$.M&&$.M.24>=\'1.8\'?\'3V\':g);4 h=v(){$.6.17=P;4 a=$.6.2K(c.B);c.B.14(\'1B.\'+$.6.1O).N({L:-a[0],J:-a[1],1c:c.B.1d(),2I:c.B.1z()})};u($.25&&$.25[f]){4 i=c.B.V();W(4 j 3W i){u(j.5n(/^3X\\.3Y\\./)){i[j]=c.B.N(j.5o(/3X\\.3Y\\./,\'\'))}}c.B.V(i).2m(f,$.6.w(c,\'2n\'),g,h)}G{c.B[f||\'2m\']((f?g:\'\'),h)}u(!f){h()}u(c.y[0].1h!=\'3Z\'){c.y[0].U()}$.6.T=c},1x:v(a){4 b=2.2K(a.B);a.B.3I().1s(2.40(a)).14(\'1B.\'+2.1O).N({L:-b[0],J:-b[1],1c:a.B.1d(),2I:a.B.1z()});a.B.1Z().1W(2.w(a,\'3l\')+(2.w(a,\'2q\')?\' M-2L M-2L-5p\':\'\')+(2.w(a,\'1q\')?\' 6-5q\':\'\')+\' \'+(a.Y?2.1N:2.1M));4 c=2.w(a,\'3s\');u(c){c.1l((a.y?a.y[0]:D),[a.B,a])}},2K:v(c){4 d=v(a){4 b=($.S.2M?1:0);x{5r:1+b,5s:3+b,5t:5+b}[a]||a};x[41(d(c.N(\'42-L-1c\'))),41(d(c.N(\'42-J-1c\')))]},3U:v(a,b,c){4 d=a.y?2.2J(a.y[0]):D;4 e=43.5u||O.15.5v;4 f=43.5w||O.15.5x;4 g=O.15.22||O.26.22;4 h=O.15.23||O.26.23;u(($.S.2M&&2N($.S.24,10)<7)||$.S.1A){4 i=0;a.B.14(\':5y(F,1B)\').1b(v(){i=1C.2O(i,2.5z+$(2).1d()+2N($(2).N(\'5A-5B\'),10))});a.B.N(\'1c\',i)}u(2.w(a,\'1q\')||(b.L+a.B.1d()-g)>e){b.L=1C.2O((c?0:g),d[0]+(a.y?a.y.1d():0)-(c?g:0)-a.B.1d()-(c&&$.S.1A?O.15.22:0))}G{b.L-=(c?g:0)}u((b.J+a.B.1z()-h)>f){b.J=1C.2O((c?0:h),d[1]-(c?h:0)-a.B.1z()-(c&&$.S.1A?O.15.23:0))}G{b.J-=(c?h:0)}x b},2J:v(a){44(a&&(a.1h==\'3Z\'||a.5C!=1)){a=a.5D}4 b=$(a).2H();x[b.L,b.J]},11:v(a,b){4 c=2.T;u(!c||(a&&c!=$.V(a,t))){x}u(2.17){b=(b!=D?b:2.w(c,\'2o\'));b=(b==\'2p\'&&$.M&&$.M.24>=\'1.8\'?\'3V\':b);4 d=2.w(c,\'2l\');u($.25&&$.25[d]){c.B.45(d,2.w(c,\'2n\'),b)}G{c.B[(d==\'5E\'?\'5F\':(d==\'5G\'?\'5H\':\'45\'))](d?b:\'\')}}4 e=2.w(c,\'3t\');u(e){e.1l((c.y?c.y[0]:D),[c.y.16(),c])}u(2.17){2.17=E;2.1X=D}u(c.Y){c.y.16(\'\')}2.T=D},3E:v(e){u(e.5I==9){$.6.1L.5J(P,P);$.6.11()}},46:v(a){u(!$.6.T){x}4 b=$(a.1r);u(!b.20().47().1R(\'.\'+$.6.1M)&&!b.1i($.6.12)&&!b.20().47().1i($.6.13)&&$.6.17){$.6.11()}},2Y:v(a){a.1P=!a.1P;2.1x(a);a.y.U()},2V:v(a){2.27(a,\'\',0);2.28(a,$.6.5K)},2W:v(a){4 b=a.y[0];4 c=a.y.16();4 d=[c.C,c.C];u(b.29){d=(a.y.K(\'1a\')||a.y.K(\'H\')?d:[b.48,b.49])}G u(b.1m){d=(a.y.K(\'1a\')||a.y.K(\'H\')?d:2.2P(b))}2.27(a,(c.C==0?\'\':c.1D(0,d[0]-1)+c.1D(d[1])),d[0]-1);2.28(a,$.6.5L)},1o:v(a,b){2.4a(a.y[0],b);2.27(a,a.y.16());2.28(a,b)},4a:v(a,b){a=(a.5M?a:$(a));4 c=a[0];4 d=a.16();4 e=[d.C,d.C];u(c.29){e=(a.K(\'1a\')||a.K(\'H\')?e:[c.48,c.49])}G u(c.1m){e=(a.K(\'1a\')||a.K(\'H\')?e:2.2P(c))}a.16(d.1D(0,e[0])+b+d.1D(e[1]));2a=e[0]+b.C;u(a.1R(\':4b\')){a.U()}u(c.29){u(a.1R(\':4b\')){c.29(2a,2a)}}G u(c.1m){e=c.1m();e.5N(\'2j\',2a);e.5O()}},2P:v(e){e.U();4 f=O.5P.5Q().5R();4 g=2.4c(e);g.5S(\'5T\',f);4 h=v(a){4 b=a.1p;4 c=b;4 d=E;44(P){u(a.5U(\'5V\',a)==0){4d}G{a.5W(\'2j\',-1);u(a.1p==b){c+=\'\\r\\n\'}G{4d}}}x c};4 i=h(g);4 j=h(f);x[i.C,i.C+j.C]},4c:v(a){4 b=(a.1u.1v()==\'1g\');4 c=(b?a.1m():O.26.1m());u(!b){c.5X(a)}x c},27:v(a,b){4 c=a.y.K(\'5Y\');u(c>-1){b=b.1D(0,c)}a.y.16(b);u(!2.w(a,\'2t\')){a.y.3w(\'5Z\')}},28:v(a,b){4 c=2.w(a,\'2t\');u(c){c.1l((a.y?a.y[0]:D),[b,a.y.16(),a])}},w:v(a,b){x a.1w[b]!==4e?a.1w[b]:2.1J[b]},40:v(b){4 c=2.w(b,\'2q\');4 d=2.w(b,\'1q\');4 e=2.w(b,\'2r\');4 f=2.w(b,\'2s\');4 g=(!e?\'\':\'\'+e+\'\');4 h=2.4f(b);W(4 i=0;i\';4 k=h[i].2R(f);W(4 j=0;j\'+(2.w(b,l.1f+\'66\')||\'&2k;\')+\'
    \':\'\')}G{g+=\'\'+(k[j]==\' \'?\'&2k;\':k[j])+\'\'}}g+=\'\'}g+=\'\'+(!b.Y&&$.S.2M&&2N($.S.24,10)<7?\'<1B 2F="67:E;" Q="\'+$.6.1O+\'">\':\'\');g=$(g);4 m=b;4 n=\'6-2S-68\'+(c?\' M-2b-69\':\'\');g.14(\'I\').4g(v(){$(2).1W(n)}).6a(v(){$(2).1Z(n)}).6b(v(){$(2).1Z(n)}).6c(\'.6-2S\').1Q(v(){$.6.1o(m,$(2).1p())});$.1b(2.1E,v(i,a){g.14(\'.6-\'+a.1f).1Q(v(){a.2A.1l(m.y,[m])})});x g},4f:v(b){4 c=2.w(b,\'3p\');4 d=2.w(b,\'3o\');4 e=2.w(b,\'3q\');4 f=2.w(b,\'3r\');4 g=2.w(b,\'3m\');u(!c&&!d&&!e&&!f){x g}4 h=2.w(b,\'1I\');4 k=2.w(b,\'1H\');4 l=2.w(b,\'2s\');4 m=[];4 p=[];4 q=[];4 r=[];W(4 i=0;i=\'A\'&&a<=\'Z\')||(a>=\'a\'&&a<=\'z\')},1I:v(a){x(a>=\'0\'&&a<=\'9\')},2c:v(a){W(4 i=a.C-1;i>0;i--){4 j=1C.6e(1C.6f()*a.C);4 b=a[i];a[i]=a[j];a[j]=b}}});v 2z(a,b){$.1K(a,b);W(4 c 3W b){u(b[c]==D||b[c]==4e){a[c]=b[c]}}x a};$.6g.6=v(a){4 b=6h.3v.6i.6j(6k,1);u(a==\'6l\'){x $.6[\'2h\'+a+\'1n\'].1l($.6,[2[0]].4h(b))}x 2.1b(v(){3P a==\'3Q\'?$.6[\'2h\'+a+\'1n\'].1l($.6,[2].4h(b)):$.6.3z(2,a)})};$.6=6m 1n();$(v(){$(O.26).1s($.6.1L).4g($.6.46)})})(6n);',62,396,'||this||var||keypad||||||||||||||||||||||||if|function|_get|return|_input|||_mainDiv|length|null|false|div|else|disabled|button|top|attr|left|ui|css|document|true|class|addKeyDef|browser|_curInst|focus|data|for|_disabledFields|_inline|||_hideKeypad|markerClassName|_triggerClass|find|documentElement|val|_keypadShowing|SPACE|HALF_SPACE|readonly|each|width|outerWidth|_pos|name|input|type|hasClass|siblings|px|apply|createTextRange|Keypad|_selectValue|text|isRTL|target|append|push|nodeName|toLowerCase|settings|_updateKeypad|remove|outerHeight|opera|iframe|Math|substr|_specialKeys|the|all|isAlphabetic|isNumeric|_defaults|extend|mainDiv|_mainDivClass|_inlineClass|_coverClass|ucase|click|is|span|_showKeypad|img|title|addClass|_lastField|end|removeClass|parents|position|scrollLeft|scrollTop|version|effects|body|_setValue|_notifyKeypress|setSelectionRange|pos|state|_shuffle|_keyCode|CLOSE|CLEAR|BACK|_|regional|character|nbsp|showAnim|show|showOptions|duration|normal|useThemeRoller|prompt|separator|onKeypress|style|display|_appendClass|_disableClass|_inlineEntryClass|extendRemove|action|textarea|_setInput|bind|both|src|default|offset|height|_findPos|_getBorders|widget|msie|parseInt|max|_getIERange|corner|split|key|_isControl|clear|_clearValue|_backValue|SHIFT|_shiftKeypad|SPACE_BAR|space|ENTER||TAB|tab|qwertyAlphabetic|qwertyuiop|asdfghjkl|zxcvbnm|qwertyLayout|789|456|123|buttonText|buttonStatus|Close|Erase|showOn|buttonImage|buttonImageOnly|appendText|keypadClass|layout|keypadOnly|randomiseAlphabetic|randomiseNumeric|randomiseOther|randomiseAll|beforeShow|onClose|none|prototype|trigger|special|noHighlight|_attachKeypad|_connectKeypad|_disableKeypad|before|after|_doKeyDown|alt|saveReadonly|removeAttr|empty|removeData|opacity|cursor|children|map|_isDisabledKeypad|typeof|string|fixed|absolute|1000px|_checkOffset|_default|in|ec|storage|hidden|_generateHTML|parseFloat|border|window|while|hide|_checkExternalClick|andSelf|selectionStart|selectionEnd|insertValue|visible|_getIETextRange|break|undefined|_randomiseLayout|mousedown|concat|close|back|shift|spacebar|half|enter|x0D|x09|Open|closeText|closeStatus|clearText|Clear|clearStatus|backText|Back|backStatus|previous|spacebarText|spacebarStatus|Space|enterText|Enter|enterStatus|Carriage|tabText|tabStatus|Horizontal|shiftText|Shift|shiftStatus|Toggle|upper|lower|case|characters|alphabeticLayout|fullLayout|hasKeypad|popup|inline|keyentry|cover|setDefaults|throw|Only|keys|allowed|String|fromCharCode|code|id|keydown|html|setData|getData|_destroyKeypad|prev|unbind|_enableKeypad|relative|prepend|inArray|_changeKeypad|offsetHeight|block|auto|match|replace|content|rtl|thin|medium|thick|innerWidth|clientWidth|innerHeight|clientHeight|not|offsetLeft|margin|right|nodeType|nextSibling|slideDown|slideUp|fadeIn|fadeOut|keyCode|stop|DEL|BS|jquery|move|select|selection|createRange|duplicate|setEndPoint|EndToStart|compareEndPoints|StartToEnd|moveEnd|moveToElementText|maxlength|change|header|row|toUpperCase|charCodeAt|highlight|Status|Text|javascript|down|active|mouseup|mouseout|filter|continue|floor|random|fn|Array|slice|call|arguments|isDisabled|new|jQuery'.split('|'),0,{})); /* http://keith-wood.name/keypad.html Turkish localisation for the jQuery keypad extension Written by Yücel Kandemir(yucel{at}21bilisim.com) September 2010. */ (function($) { // hide the namespace $.keypad.regional['tr'] = { buttonText: '...', buttonStatus: 'Aç', closeText: 'Kapat', closeStatus: 'Klavyeyi Kapatır', clearText: 'Sil', clearStatus: 'İçerisini Temizler', backText: 'Geri Al', backStatus: 'Son Karakteri Siler.', shiftText: 'Büyüt', shiftStatus: 'Büyük Harfle Yazmak İçin Seçiniz.', spacebarText: ' ', spacebarStatus: '', enterText: 'Enter', enterStatus: '', tabText: '›', tabStatus: '', alphabeticLayout: $.keypad.qwertyAlphabetic, fullLayout: $.keypad.qwertyLayout, isAlphabetic: $.keypad.isAlphabetic, isNumeric: $.keypad.isNumeric, isRTL: false}; $.keypad.setDefaults($.keypad.regional['tr']); })(jQuery); // jQuery Mask Plugin v1.14.15 // github.com/igorescobar/jQuery-Mask-Plugin var $jscomp={scope:{},findInternal:function(a,l,d){a instanceof String&&(a=String(a));for(var p=a.length,h=0;hd?g=10*e:f>=g&&f!==d?c.maskDigitPosMapOld[g]||(f=g,g=g-(l-h)-a,c.maskDigitPosMap[g]&&(g=f)):g>f&& (g=g+(h-l)+m)}return g},behaviour:function(f){f=f||window.event;c.invalid=[];var e=b.data("mask-keycode");if(-1===a.inArray(e,m.byPassKeys)){var e=c.getMasked(),g=c.getCaret();setTimeout(function(){c.setCaret(c.calculateCaretPosition())},a.jMaskGlobals.keyStrokeCompensation);c.val(e);c.setCaret(g);return c.callbacks(f)}},getMasked:function(a,b){var g=[],d=void 0===b?c.val():b+"",n=0,h=e.length,q=0,l=d.length,k=1,r="push",p=-1,t=0,y=[],v,z;f.reverse?(r="unshift",k=-1,v=0,n=h-1,q=l-1,z=function(){return-1< n&&-1
    ',e.titleMarkup='\n
    \n',e.textMarkup='\n
    ',e.footerMarkup='\n
    \n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1);e.CONFIRM_KEY="confirm",e.CANCEL_KEY="cancel";var r={visible:!0,text:null,value:null,className:"",closeModal:!0},i=Object.assign({},r,{visible:!1,text:"Cancel",value:null}),a=Object.assign({},r,{text:"OK",value:!0});e.defaultButtonList={cancel:i,confirm:a};var s=function(t){switch(t){case e.CONFIRM_KEY:return a;case e.CANCEL_KEY:return i;default:var n=t.charAt(0).toUpperCase()+t.slice(1);return Object.assign({},r,{text:n,value:t})}},c=function(t,e){var n=s(t);return!0===e?Object.assign({},n,{visible:!0}):"string"==typeof e?Object.assign({},n,{visible:!0,text:e}):o.isPlainObject(e)?Object.assign({visible:!0},n,e):Object.assign({},n,{visible:!1})},l=function(t){for(var e={},n=0,o=Object.keys(t);n=0&&w.splice(e,1)}function s(t){var e=document.createElement("style");return t.attrs.type="text/css",l(e,t.attrs),i(t,e),e}function c(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",l(e,t.attrs),i(t,e),e}function l(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function u(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var l=h++;n=g||(g=s(e)),o=f.bind(null,n,l,!1),r=f.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(e),o=p.bind(null,n,e),r=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),o=d.bind(null,n),r=function(){a(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}function f(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=x(e,r);else{var i=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function d(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function p(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=y(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var m={},b=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),v=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t.call(this,n)),e[n]}}(function(t){return document.querySelector(t)}),g=null,h=0,w=[],y=n(15);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||(e.singleton=b()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=r(t,e);return o(n,e),function(t){for(var i=[],a=0;athis.length)&&-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),o=n.length>>>0;if(0===o)return!1;for(var r=0|e,i=Math.max(r>=0?r:o-Math.abs(r),0);i=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(19),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,n){(function(t,e){!function(t,n){"use strict";function o(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n1)for(var n=1;n
    ',e.default=e.modalMarkup},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.OVERLAY,i='
    \n
    ';e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.ICON;e.errorIconMarkup=function(){var t=r+"--error",e=t+"__line";return'\n
    \n \n \n
    \n '},e.warningIconMarkup=function(){var t=r+"--warning";return'\n \n \n \n '},e.successIconMarkup=function(){var t=r+"--success";return'\n \n \n\n
    \n
    \n '}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.CONTENT;e.contentMarkup='\n
    \n\n
    \n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=o.default.BUTTON_CONTAINER,i=o.default.BUTTON,a=o.default.BUTTON_LOADER;e.buttonMarkup='\n
    \n\n \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(4),r=n(2),i=n(0),a=i.default.ICON,s=i.default.ICON_CUSTOM,c=["error","warning","success","info"],l={error:r.errorIconMarkup(),warning:r.warningIconMarkup(),success:r.successIconMarkup()},u=function(t,e){var n=a+"--"+t;e.classList.add(n);var o=l[t];o&&(e.innerHTML=o)},f=function(t,e){e.classList.add(s);var n=document.createElement("img");n.src=t,e.appendChild(n)},d=function(t){if(t){var e=o.injectElIntoModal(r.iconMarkup);c.includes(t)?u(t,e):f(t,e)}};e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),r=n(4),i=function(t){navigator.userAgent.includes("AppleWebKit")&&(t.style.display="none",t.offsetHeight,t.style.display="")};e.initTitle=function(t){if(t){var e=r.injectElIntoModal(o.titleMarkup);e.textContent=t,i(e)}},e.initText=function(t){if(t){var e=document.createDocumentFragment();t.split("\n").forEach(function(t,n,o){e.appendChild(document.createTextNode(t)),n0}).forEach(function(t){b.classList.add(t)})}n&&t===c.CONFIRM_KEY&&b.classList.add(s),b.textContent=r;var g={};return g[t]=i,f.setActionValue(g),f.setActionOptionsFor(t,{closeModal:p}),b.addEventListener("click",function(){return u.onAction(t)}),m},p=function(t,e){var n=r.injectElIntoModal(l.footerMarkup);for(var o in t){var i=t[o],a=d(o,i,e);i.visible&&n.appendChild(a)}0===n.children.length&&n.remove()};e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),r=n(4),i=n(2),a=n(5),s=n(6),c=n(0),l=c.default.CONTENT,u=function(t){t.addEventListener("input",function(t){var e=t.target,n=e.value;a.setActionValue(n)}),t.addEventListener("keyup",function(t){if("Enter"===t.key)return s.onAction(o.CONFIRM_KEY)}),setTimeout(function(){t.focus(),a.setActionValue("")},0)},f=function(t,e,n){var o=document.createElement(e),r=l+"__"+e;o.classList.add(r);for(var i in n){var a=n[i];o[i]=a}"input"===e&&u(o),t.appendChild(o)},d=function(t){if(t){var e=r.injectElIntoModal(i.contentMarkup),n=t.element,o=t.attributes;"string"==typeof n?f(e,n,o):e.appendChild(n)}};e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(2),i=function(){var t=o.stringToNode(r.overlayMarkup);document.body.appendChild(t)};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(5),r=n(6),i=n(1),a=n(3),s=n(0),c=s.default.MODAL,l=s.default.BUTTON,u=s.default.OVERLAY,f=function(t){t.preventDefault(),v()},d=function(t){t.preventDefault(),g()},p=function(t){if(o.default.isOpen)switch(t.key){case"Escape":return r.onAction(a.CANCEL_KEY)}},m=function(t){if(o.default.isOpen)switch(t.key){case"Tab":return f(t)}},b=function(t){if(o.default.isOpen)return"Tab"===t.key&&t.shiftKey?d(t):void 0},v=function(){var t=i.getNode(l);t&&(t.tabIndex=0,t.focus())},g=function(){var t=i.getNode(c),e=t.querySelectorAll("."+l),n=e.length-1,o=e[n];o&&o.focus()},h=function(t){t[t.length-1].addEventListener("keydown",m)},w=function(t){t[0].addEventListener("keydown",b)},y=function(){var t=i.getNode(c),e=t.querySelectorAll("."+l);e.length&&(h(e),w(e))},x=function(t){if(i.getNode(u)===t.target)return r.onAction(a.CANCEL_KEY)},_=function(t){var e=i.getNode(u);e.removeEventListener("click",x),t&&e.addEventListener("click",x)},k=function(t){o.default.timer&&clearTimeout(o.default.timer),t&&(o.default.timer=window.setTimeout(function(){return r.onAction(a.CANCEL_KEY)},t))},O=function(t){t.closeOnEsc?document.addEventListener("keyup",p):document.removeEventListener("keyup",p),t.dangerMode?v():g(),y(),_(t.closeOnClickOutside),k(t.timer)};e.default=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(3),i=n(37),a=n(38),s={title:null,text:null,icon:null,buttons:r.defaultButtonList,content:null,className:null,closeOnClickOutside:!0,closeOnEsc:!0,dangerMode:!1,timer:null},c=Object.assign({},s);e.setDefaults=function(t){c=Object.assign({},s,t)};var l=function(t){var e=t&&t.button,n=t&&t.buttons;return void 0!==e&&void 0!==n&&o.throwErr("Cannot set both 'button' and 'buttons' options!"),void 0!==e?{confirm:e}:n},u=function(t){return o.ordinalSuffixOf(t+1)},f=function(t,e){o.throwErr(u(e)+" argument ('"+t+"') is invalid")},d=function(t,e){var n=t+1,r=e[n];o.isPlainObject(r)||void 0===r||o.throwErr("Expected "+u(n)+" argument ('"+r+"') to be a plain object")},p=function(t,e){var n=t+1,r=e[n];void 0!==r&&o.throwErr("Unexpected "+u(n)+" argument ("+r+")")},m=function(t,e,n,r){var i=typeof e,a="string"===i,s=e instanceof Element;if(a){if(0===n)return{text:e};if(1===n)return{text:e,title:r[0]};if(2===n)return d(n,r),{icon:e};f(e,n)}else{if(s&&0===n)return d(n,r),{content:e};if(o.isPlainObject(e))return p(n,r),e;f(e,n)}};e.getOpts=function(){for(var t=[],e=0;e
    '); $(".piyasa-indirim").each(function () { if ($(this).text() == "%" || !$(this).text()) $(this).remove(); }); }); } } function ajaxLoaderDiv() { return '
    '; } function sepetAdetGuncelle(lineID, adet) { // $('.basket-wrap:first').html(ajaxLoaderDiv()); url = "page.php?act=sepet&op=guncelle&lineID=" + lineID + "&adet=" + adet + "&viewPopup=1&isAjax=1"; $.get(url, function (data) { sepetHTMLGuncelle(data); }); } function sepetSecimGuncelle(paytype, taksit) { // return; // $('.basket-wrap:first').html(ajaxLoaderDiv()); url = "page.php?act=sepet&paytype=" + paytype + "&taksit=" + taksit + "&viewPopup=1&isAjax=1"; $.get(url, function (data) { sepetHTMLGuncelle(data); }); } function sepetSatirSil(lineID, urunID) { // $('.basket-wrap:first').html(ajaxLoaderDiv()); url = "page.php?act=sepet&op=sil&lineID=" + lineID + "&urunID=" + urunID + "&viewPopup=1&isAjax=1"; $.get(url, function (data) { sepetHTMLGuncelle(data); }); } function sepetBosalt() { // $('.basket-wrap:first').html(ajaxLoaderDiv()); url = "page.php?act=sepet&op=bosalt&viewPopup=1&isAjax=1"; $.get(url, function (data) { sepetHTMLGuncelle(data); }); } function sepetHTMLGuncelle(dataHTML) { if ($(dataHTML).find(".basket-wrap:first").html() != null) $(".basket-wrap:first").html($(dataHTML).find(".basket-wrap:first").html()); var url = "include/ajaxLib.php?act=sepetGoster"; $.get(url, function (data) { updateSepetBilgi("#toplamFiyat", "ModulFarkiIle"); updateSepetBilgi("#toplamUrun", "toplamUrun"); $("#sepetGoster .basket-wrap").html($(data).find(".basket-wrap").html()); if ($(dataHTML).find(".basket-wrap:first").html() == null) { $(".basket-wrap:first").html($(data).find(".basket-wrap:first").html()); } }); } function sepetAdresHTMLGuncelle() { var url = "page.php?act=satinal&op=adres"; $.get(url, function (data) { $(".basket-wrap").html($(data).find(".basket-wrap").html()); }); } function goUrun(urunID) { if (!urunID) return; url = "include/ajaxLib.php?act=getUrunLink&urunID=" + urunID; $.get(url, function (data) { window.location.href = data; }); } function goCat(catID) { if (!catID) return; url = "include/ajaxLib.php?act=getCategoryLink&catID=" + catID; $.get(url, function (data) { window.location.href = data; }); } function urunListAjax(id, catID, order, limit, urunlist, urunlistshow) { url = "include/ajaxLib.php?act=urunList&catID=" + catID + "&orderBy=" + encodeURIComponent(order) + "&limit=" + limit + "&urunlist=" + encodeURIComponent(urunlist) + "&urunlistshow=" + encodeURIComponent(urunlistshow); $.get(url, function (data) { $("#" + id).html(data); }); } function kategoriListAjax(id, parentID) { url = "include/ajaxLib.php?act=kategoriListOption&parentID=" + parentID; $.get(url, function (data) { $("#" + id).html(data); }); } function shopPHPPaymentStep2(formID) { if (typeof myShopPHPPaymentStep2 == "function") { return myShopPHPPaymentStep2(formID); } if ($(".new-addres-item").length && !$(".addres-item.active").length) { alerter.show("Lütfen önce adres girişinizi yazın."); return; } $("#shopphp-payment-body-step3").html("").css("minHeight", "auto"); $("#shopphp-payment-body-step2").show().html(ajaxLoaderDiv()); if ($("#shopphp-payment-body-step2").length) $(window).scrollTop($("#shopphp-payment-body-step2").offset().top); $.ajax({ type: "POST", url: "page.php?act=satinal&op=adres&viewPopup=1&isAjax=1", data: $("#" + formID).serialize(), success: function (response) { if ($("#shopphp-payment-body-step2").length) $("#shopphp-payment-body-step1").hide("fast"); sepetAdresHTMLGuncelle(); $.get("include/ajaxLib.php?act=siparisOdemeSecim", function (data) { if ($("#shopphp-payment-body-step2").length) $("#shopphp-payment-body-step2").html(data); else window.location.href = "page.php?act=satinal&op=secim"; return; }); }, }); return false; } function shopPHPPaymentStep3(selectedPayType) { if (!$("#shopphp-payment-body-step3").length) { window.location.href = "page.php?act=satinal&op=odeme&paytype=" + encodeURIComponent(selectedPayType); return; } $("#shopphp-payment-body-step3").show().html(ajaxLoaderDiv()); $(window).scrollTop($("#shopphp-payment-body-step3").offset().top); $.ajax({ type: "GET", url: "page.php?act=satinal&op=odeme&paytype=" + encodeURIComponent(selectedPayType) + "&viewPopup=1&isAjax=1", success: function (response) { $("#shopphp-payment-body-step1").hide("fast"); $("#shopphp-payment-body-step2").hide("fast"); if ($(response).find("#shopphp-payment-body-step3").html() == null) { window.location.href = "page.php?act=satinal&op=odeme&paytype=" + encodeURIComponent(selectedPayType); return; } $("#shopphp-payment-body-step3").html( $(response).find("#shopphp-payment-body-step3").html() ); $("#shopphp-payment-body-step3").css("minHeight", "600px"); bindCCFunctions(); }, }); return false; } function urunAjax(urunID, loadID, listTemp, showTemp) { if (!listTemp) listTemp = "empty"; if (!$(".urun-ajax-" + urunID).length) return; $.get( "include/ajaxLib.php?act=tek-urun&purunID=" + urunID + "&urunID=" + loadID + "&list-temp=" + listTemp + "&show-temp=" + showTemp, function (data) { $(".urun-ajax-" + urunID).html($(data).html()); } ); } function urunFiyat(urunID, obj) { $.get("include/ajaxLib.php?act=urunFiyat&urunID=" + urunID, function (data) { $(obj).val(data); }); } function odemeKontrol(alt) { if ($("#odeme-onay").length && !$("#odeme-onay").is(":checked")) { alerter.show(alt); return false; } return true; } function gfUrunFormSubmit(formID, urunID) { var dataSerialize = $("#" + formID).serialize(); // $("#" + formID).html(ajaxLoaderDiv()); $.ajax({ type: "POST", url: "page.php?act=urunDetay&urunID=" + urunID + "&getOnlyResponse=1", data: dataSerialize, success: function (response) { $("#" + formID).html(response); }, }); return false; } function gfSiteFormSubmit(formID, act, data) { var dataSerialize = $("#" + formID).serialize(); $("#" + formID).html(ajaxLoaderDiv()); $.ajax({ type: "POST", url: "page.php?act=" + act + "&getOnlyResponse=1&data=" + data, data: dataSerialize, success: function (response) { $("#" + formID).html(response); }, }); return false; } function sepetEkleKontrol() { sepetEkleKontrolValue = true; if (typeof preSepetEkleKontrol == "function") { preSepetEkleKontrol(); } if (sepetEkleKontrolValue && typeof preSepetEkleKontrol2 == "function") { preSepetEkleKontrol2(); } updateSecimURL(); if ($("#urunKurallari").length) { if (!$("#urunKurallari").is(":checked")) { alerter.show(lang_onaySepet); sepetEkleKontrolValue = false; } } for (var i = 1; i <= 10; i++) { if ( sepetEkleKontrolValue && $(".urunSecim_ozellik" + i + "detay li").length > 1 && !$(".urunSecim_ozellik" + i + "detay li.selected").length ) { alerter.show(lang_urunVarSecim); sepetEkleKontrolValue = false; } } for (var i = 1; i <= 10; i++) { if ( sepetEkleKontrolValue && $("select[name=ozellik" + i + "detay] option").length > 1 && !$("select[name=ozellik" + i + "detay]").val() ) { alerter.show(lang_urunVarSecim); sepetEkleKontrolValue = false; } } for (var i = 1; i <= 10; i++) { if ( sepetEkleKontrolValue && $("#urunSecim_ozellik" + i + "detay").length && !$("#urunSecim_ozellik" + i + "detay").val() ) { alerter.show(lang_urunVarSecim); sepetEkleKontrolValue = false; } } return sepetEkleKontrolValue; } function urunTooltip(urunAdi, gosterim) { if (gosterim <= 1) return; var str = lang_urunDefaIncelendi; str = str.replace(/%gosterim%/i, gosterim).replace(/%urunadi%/i, urunAdi); $('
    ' + str + "
    ").appendTo("body"); $("#urunTooltip").fadeTo("fast", 0.7); setTimeout(function () { $("#urunTooltip").fadeTo("fast", 0, function () { $(this).remove(); }); }, 5000); } function ebultenSubmit(objid) { var email = $("#" + objid).val(); $.ajax({ url: "include/ajaxLib.php?act=ebulten&email=" + encodeURIComponent(email), success: function (data) { alerter.show(data); $("#" + objid).val(""); }, }); return false; } function getPaketAdet(val, plus) { val = parseInt(val); var r = 0; if (!Array.isArray(adetArray)) return 1; if (adetArray.length < 2) return 1; var index = adetArray.indexOf(val); //if(index >= 0 && index < adetArray.length - 1) if (adetArray[index + plus]) r = adetArray[index + plus]; else return 0; return (r - val) * plus; } function azalt(input) { var eskiDeger = input.value; var adet = getPaketAdet(eskiDeger, -1); yeniDeger = parseInt(input.value) - adet; input.value = yeniDeger < adet ? eskiDeger : yeniDeger; return false; } function arttir(input) { var adet = getPaketAdet(input.value, +1); input.value = parseInt(input.value) + adet; return false; } function setImageMaxSideSize(selector, maxWidthSet, maxHeightSet) { $(selector).each(function () { var maxWidth = maxWidthSet; // Max width for the image var maxHeight = maxHeightSet; // Max height for the image var ratio = 0; // Used for aspect ratio var width = $(this).width(); // Current image width var height = $(this).height(); // Current image height // Check if the current width is larger than the max if (width > maxWidth) { ratio = maxWidth / width; // get ratio for scaling image $(this).css("width", maxWidth); // Set new width $(this).css("height", "auto"); // Scale height based on ratio height = height * ratio; // Reset height to match scaled image width = width * ratio; // Reset width to match scaled image } // Check if current height is larger than max if (height > maxHeight) { ratio = maxHeight / height; // get ratio for scaling image $(this).css("height", maxHeight); // Set new height $(this).css("width", "auto"); // Scale width based on ratio width = width * ratio; // Reset width to match scaled image height = height * ratio; // Reset height to match scaled image } }); } function ajaxKarsilastir() { $.ajax({ url: "include/ajaxLib.php?act=ajaxKarsilastir", success: function (data) { window.location.href = "page.php?act=karsilastir&" + data; // pencereAc('compare.php?' + data ,800,400); }, }); return false; } function karsilastirmaEkle(urunID) { $.ajax({ url: "include/ajaxLib.php?CookieInsertUrunID=" + encodeURIComponent(urunID), success: function (data) { $.ajax({ url: "include/ajaxLib.php?act=karsilastrimaListem", success: function (data) { $("#karsilastirmaListeBlock").html(data); alerter.show(lang_karsilastirmaEklendi); }, }); }, }); return false; } function karsilastirmaKaldir(urunID) { $.ajax({ url: "include/ajaxLib.php?CookieRemoveUrunID=" + encodeURIComponent(urunID), success: function (data) { $.ajax({ url: "include/ajaxLib.php?act=karsilastrimaListem", success: function (data) { $("#karsilastirmaListeBlock").html(data); alerter.show(lang_karsilastirmaKaldirildi); }, }); }, }); return false; } function alarmEkle(ftype, urunID) { $.ajax({ url: "include/ajaxLib.php?fa=true&ftype=" + encodeURIComponent(ftype) + "&urunID=" + encodeURIComponent(urunID), success: function (data) { alerter.show(lang_listeEklendi); }, }); return false; } function updateAnaResim(url, width) { return; } function uyelikIptal(str) { if (confirm(str)) window.location.href = siteDizini + "page.php?act=logout&remove=true"; } function updateOptionList(obj, stok) { if ($(obj) == null || stok == "") return; $(obj).find("option").remove(); var maxSatis = $(obj).parent().prop("max"); if (maxSatis) stok = Math.min(stok, maxSatis); stok = Math.min(stok, 100); for (var i = 0; i <= stok; i++) { if (i) $("").appendTo(obj); } } function moneyFormat3(num) { var p = num.toFixed(2).split("."); var out = ( "" + p[0] .split("") .reverse() .reduce(function (acc, num, i, orig) { return num + (i && !(i % 3) ? "," : "") + acc; }, "") + "." + p[1] ); return out; } function updateShopPHPUrunFiyat(fark) { if (isNaN(fark)) fark = 0; $("#shopPHPUrunFiyatOrg").text(moneyFormat(shopPHPUrunFiyatOrg + fark)); $("#shopPHPUrunFiyatT").text( moneyFormat((shopPHPUrunFiyatOrg + fark) / shopPHPFiyatCarpanT) ); $("#shopPHPUrunFiyatOrg_KH").text( moneyFormat((shopPHPUrunFiyatOrg + fark) / (1 + shopPHPUrunKDV)) ); $("#shopPHPUrunFiyatYTL").text( moneyFormat((shopPHPUrunFiyatOrg + fark) * shopPHPFiyatCarpan) ); $("#shopPHPUrunFiyatYTL_KH").text( moneyFormat( ((shopPHPUrunFiyatOrg + fark) * shopPHPFiyatCarpan) / (1 + shopPHPUrunKDV) ) ); $("#shopPHPHavaleIndirim").text( moneyFormat( (shopPHPUrunFiyatOrg + fark) * shopPHPFiyatCarpan * (1 - shopPHPHavaleIndirim) ) ); $("#shopPHPTekCekimOran").text( moneyFormat( (shopPHPUrunFiyatOrg + fark) * shopPHPFiyatCarpan * (1 - shopPHPTekCekimOran) ) ); if (paytrURL) $("#paytr_taksit_guncelle").html( '
    ' ); } var shopPHPUrunFiyatOrg2 = 0; function updateUrunSecim(urunID, varID, varName, widthDetay, widthList, obj) { if (!shopPHPUrunFiyatOrg2) shopPHPUrunFiyatOrg2 = shopPHPUrunFiyatOrg; if ($(obj).hasClass("disabled")) { //alerter.show(lang_secimStokYok); return false; } if (isMobile) $("html, body").animate({ scrollTop: 0 }, "slow"); $(obj).parent().find("li").removeClass("selected"); $(obj).addClass("selected"); $("input[name=" + varID + "]").val(varName); var varurl = ""; var url = ""; var currentID = parseInt(varID.replace("ozellik", "").replace("detay", "")); for (i = 1; i <= 10; i++) { if ($("input[name=ozellik" + i + "detay]").length) varurl += "&var" + i + "=" + encodeURIComponent($("input[name=ozellik" + i + "detay]").val()); if (i > currentID) { $("ul.urunSecim_ozellik" + i + "detay li") .addClass("disabled") .attr("disabled", "disabled") .removeClass("selected"); $("input[name=ozellik" + i + "detay]").val(""); } } if ($("input[name=ozellik" + (currentID + 1) + "detay]").length) { url = "include/ajaxLib.php?act=varListUpdate&seq=" + (currentID + 1) + "&urunID=" + urunID + varurl; $.get(url, function (data) { if (data) $("ul.urunSecim_ozellik" + (currentID + 1) + "detay").html(data); }); } url = "include/ajaxLib.php?act=varKodKontrol&urunID=" + urunID + varurl; $.get(url, function (data) { if (data) $("#spUrunKodu").text(data); }); updateSecimURL(); updateVarResim(urunID, varID, varName); ajaxFiyatGuncelle(urunID); updateOptionList(".urunSepeteEkleAdet", $(obj).attr("stok")); return; } function updateVarResim(urunID, varID, varName) { // alert(urunID + '-' + varID + '-' + varName); var url = "include/ajaxLib.php?ajax=1&act=urunResimListContainer&urunID=" + encodeURIComponent(urunID); $.get(url, function (data) { // if(data) $("#urunResimListContainer").html(data); // alert(data); var widthDetay = 600; varID = varID.replace(/ozellik/i, "").replace(/detay/i, ""); var url = "include/ajaxLib.php?act=urunSecenekSecim&urunID=" + encodeURIComponent(urunID) + "&urunVarID=" + encodeURIComponent(varID) + "&urunVarName=" + encodeURIComponent(varName) + "&r=" + Math.floor(Math.random() * 99999); $(".lightbox .fancybox").attr("href", "include/resize.php?path=" + url); $.ajax({ url: url, success: function (data) { $("#loading").remove(); var obj = jQuery.parseJSON(data); if (obj.resim1 == null || !obj.resim1) return; $("#urunResimListContainer img").parent().parent().hide(); var url = ""; if (obj.resim1) { $("#urunResimListContainer img:eq(0)").parent().parent().show(); url = "images/urunler/" + obj.resim1; $(".lightbox:first").attr("href", url); $(".lightbox:first img") .attr( "src", "include/resize.php?path=" + url + "&width=" + widthDetay ) .attr("data-zoom-image", url); $("#urunResimListContainer img:first") .attr("src", "include/resize.php?path=" + url + "&width=300") .parent() .attr("data-zoom-image", url) .attr( "data-image", "include/resize.php?path=" + url + "&width=" + widthDetay ) .unbind("click"); } if (obj.resim2) { $("#urunResimListContainer img:eq(1)").parent().parent().show(); url = "images/urunler/" + obj.resim2; $("#urunResimListContainer img:eq(1)") .show() .attr("src", "include/resize.php?path=" + url + "&width=300") .parent() .attr("data-zoom-image", url) .attr( "data-image", "include/resize.php?path=" + url + "&width=" + widthDetay ) .unbind("click"); } else $("#urunResimListContainer img:eq(1)").parent().parent().hide(); if (obj.resim3) { $("#urunResimListContainer img:eq(2)").parent().parent().show(); url = "images/urunler/" + obj.resim3; $("#urunResimListContainer img:eq(2)") .show() .attr("src", "include/resize.php?path=" + url + "&width=300") .parent() .attr("data-zoom-image", url) .attr( "data-image", "include/resize.php?path=" + url + "&width=" + widthDetay ) .unbind("click"); } else $("#urunResimListContainer img:eq(2)").parent().parent().hide(); if (obj.resim4) { $("#urunResimListContainer img:eq(3)").parent().parent().show(); url = "images/urunler/" + obj.resim4; $("#urunResimListContainer img:eq(3)") .show() .attr("src", "include/resize.php?path=" + url + "&width=300") .parent() .attr("data-zoom-image", url) .attr( "data-image", "include/resize.php?path=" + url + "&width=" + widthDetay ) .unbind("click"); } else $("#urunResimListContainer img:eq(3)").parent().parent().hide(); if (obj.resim5) { $("#urunResimListContainer img:eq(4)").parent().parent().show(); url = "images/urunler/" + obj.resim5; $("#urunResimListContainer img:eq(4)") .parent() .parent() .show() .attr("src", "include/resize.php?path=" + url + "&width=300") .parent() .attr("data-zoom-image", url) .attr( "data-image", "include/resize.php?path=" + url + "&width=" + widthDetay ) .unbind("click"); } else $("#urunResimListContainer img:eq(4)").hide(); $("#urunResimListContainer img").bind("click", function (e) {}); galeri = []; var i = 0; $.each($("#urunResimListContainer a"), function () { galeri.push( $("#urunResimListContainer a").eq(i).attr("data-zoom-image") ), i++; }); galeri[0] = $(".lightbox a").eq(0).attr("href"); $(".zoomContainer").remove(); //if (!isMobile) { $(".lightbox img").unbind("click"); $(".lightbox img").removeData("elevateZoom"); $(".lightbox img").removeData("zoomImage"); $(".lightbox:first img").elevateZoom({ gallery: "urunResimListContainer", easing: true, }); $(".lightbox:first img").bind("click", function (e) { var ez = $(".lightbox:first img").data("elevateZoom"); $.fancybox(ez.getGalleryList()); return false; }); } }, }); }); } function sepeteEkleLink(urunID, obj) { updateSecimAppendURL(urunID); if (sepetEkleKontrol()) { window.location.href = siteDizini + "page.php?act=sepet&op=ekle&adet=" + urunSepeteEkleAdet + secimURL + "&urunID=" + urunID; return false; } } function hemenAlLink(urunID, obj) { updateSecimAppendURL(urunID); if (sepetEkleKontrol()) { window.location.href = siteDizini + "page.php?act=sepet&op=ekle&adet=" + urunSepeteEkleAdet + secimURL + "&urunID=" + urunID + "&hemenal=true"; return false; } } function ajaxFiyatGuncelle(urunID) { $('.old-price,.discount').hide(); updateSecimURL(); urunSepeteEkleAdet = $(".urunSepeteEkleAdet_" + urunID).val(); if (!urunSepeteEkleAdet) urunSepeteEkleAdet = $(".urunSepeteEkleAdet").val(); if (!urunSepeteEkleAdet) urunSepeteEkleAdet = 1; var url = "include/ajaxLib.php?ajax=1&act=sepetEkle&urunID=" + encodeURIComponent(urunID) + "&adet=" + encodeURIComponent(urunSepeteEkleAdet) + "&" + secimURL + "&showprice=true"; $.get(url, function (data) { var m = data.split("|"); m[0] = parseFloat(m[0]); m[1] = parseFloat(m[1]); if(!m[1]) return; if(isNaN(m[0])) return; $("#shopPHPUrunFiyatOrg").text(moneyFormat(m[1])); $("#shopPHPUrunFiyatT").text(moneyFormat(m[1])); $("#shopPHPUrunFiyatOrg_KH").text(moneyFormat(m[1] / (1 + shopPHPUrunKDV))); $("#shopPHPUrunFiyatYTL").text(moneyFormat(m[0])); $("#shopPHPUrunFiyatYTL_KH").text( moneyFormat((m[1] * 1) / (1 + shopPHPUrunKDV)) ); $("#shopPHPHavaleIndirim").text( moneyFormat(m[1] * 1 * (1 - shopPHPHavaleIndirim)) ); $("#shopPHPTekCekimOran").text( moneyFormat(m[1] * 1 * (1 - shopPHPTekCekimOran)) ); }); } function sepeteEkle(urunID, obj) { if (typeof mySepeteEkle == "function") { return mySepeteEkle(urunID, obj); } updateSecimURL(); urunSepeteEkleAdet = $(".urunSepeteEkleAdet_" + urunID).val(); if (!urunSepeteEkleAdet) urunSepeteEkleAdet = $(".urunSepeteEkleAdet").val(); if (!urunSepeteEkleAdet) urunSepeteEkleAdet = 1; sepetEkleKontrol(); if (sepetEkleKontrolValue) { var url = "include/ajaxLib.php?ajax=1&act=sepetEkle&urunID=" + encodeURIComponent(urunID) + "&adet=" + encodeURIComponent(urunSepeteEkleAdet) + "&" + secimURL; $.get(url, function (data) { if (data == "urun_link") window.location.href = siteDizini + "page.php?act=sepet&op=ekle&adet=" + urunSepeteEkleAdet + "&urunID=" + urunID; else if (data == "urun_var") alerter.show("Ürün daha önce sepetinize eklenmiş"); else if (data == "urun_stok_yok") alerter.show(lang_stoktaOlmayanUrunuEkleyemezsiniz); else { swal({ text: "Ürün sepetinize eklendi.", timer: 1500, type: "info", icon: "success", button: lang_OK, showConfirmButton: false, showCancelButton: false, }); sepetHTMLGuncelle(""); $(".urunSecim li").removeClass("selected"); $( "#urunSecim_ozellik1detay,#urunSecim_ozellik2detay,#urunSecim_ozellik3detay" ).val(""); } secimURL = ""; }); } return false; } function updateSepetBilgi(selector, act) { var url = "include/ajaxLib.php?act=sepetBilgi&op=" + encodeURIComponent(act); $.get(url, function (data) { $(selector).html(data); }); } function multiSepetEkle() { //$(obj).parent().html(lang_lutfenBekleyin); var url = "include/ajaxLib.php?act=sepetEkle&urunID=" + encodeURIComponent($("#relUrunID").val()) + "&adet=" + encodeURIComponent(urunSepeteEkleAdet) + "&ajax=1"; //window.open(url); $.get(url, function (data) { //alert(data); $("#sepetGoster").html(data); }); for (var i = 0; i <= 10; i++) { if ( $("#adet_" + i).val() && $("#adet_" + i).val() >= 1 && $("#adet_" + i).is(":checked") ) { var url = "include/ajaxLib.php?act=sepetEkle&urunID=" + encodeURIComponent($("#relUrunID").val()) + "&adet=" + $("#adet_" + i).val() + "&beraberUrunler=" + $("#adet_" + i).attr("urunID") + "&ekle_adet_" + $("#adet_" + i).attr("urunID") + "=" + $("#adet_" + i).val() + "&relUrunID=" + $("#relUrunID").val(); $.get(url, function (data) { //alert(url + ' : ' + data); $("#sepetGoster").html(data); }); } } setTimeout(function () { window.location.href = siteDizini + "page.php?act=sepet&x=1"; }, 2000); return false; } function changeSPSlide(obj, num, total) { num = Math.round(num % total); $(obj).find(".spSlide").hide("fast"); $(obj) .find(".spSlide:eq(" + num + ")") .fadeIn("slow"); setTimeout(function () { changeSPSlide(obj, num + 1, total); }, 5000); } function tckimlikkontorolu(KimlikNo) { KimlikNo = String(KimlikNo); if (!KimlikNo.match(/^[0-9]{11}$/)) return false; pr1 = parseInt(KimlikNo.substr(0, 1)); pr2 = parseInt(KimlikNo.substr(1, 1)); pr3 = parseInt(KimlikNo.substr(2, 1)); pr4 = parseInt(KimlikNo.substr(3, 1)); pr5 = parseInt(KimlikNo.substr(4, 1)); pr6 = parseInt(KimlikNo.substr(5, 1)); pr7 = parseInt(KimlikNo.substr(6, 1)); pr8 = parseInt(KimlikNo.substr(7, 1)); pr9 = parseInt(KimlikNo.substr(8, 1)); pr10 = parseInt(KimlikNo.substr(9, 1)); pr11 = parseInt(KimlikNo.substr(10, 1)); if ((pr1 + pr3 + pr5 + pr7 + pr9 + pr2 + pr4 + pr6 + pr8 + pr10) % 10 != pr11) return false; if ( ((pr1 + pr3 + pr5 + pr7 + pr9) * 7 + (pr2 + pr4 + pr6 + pr8) * 9) % 10 != pr10 ) return false; if (((pr1 + pr3 + pr5 + pr7 + pr9) * 8) % 10 != pr11) return false; return true; } function teklifFiyatGuncelle() { var ToplamKDVDahil = 0; var ToplamKDVHaric = 0; var KDVDahil = 0; var KDVHaric = 0; var KDV = 0; $("table.teklif tr.teklifSatir").each(function () { KDV = $(this).find(".kdv").text().replace(/\%/i, ""); KDVDahil = $(this).find(".adet").val() * $(this).find(".fiyat").val().replace(/,/i, ""); KDVHaric = KDVDahil / (1 + KDV / 100); ToplamKDVDahil += KDVDahil; ToplamKDVHaric += KDVHaric; $(this).find(".toplam").text(moneyFormat(KDVDahil)); }); $("#kdvdahil").html(moneyFormat(ToplamKDVDahil)); $("#kdvharic").html(moneyFormat(ToplamKDVHaric)); $("#toplamkdv").html(moneyFormat(ToplamKDVDahil - ToplamKDVHaric)); $("#toplamytl").html(moneyFormat(ToplamKDVDahil)); $("#dolar").html(moneyFormat(ToplamKDVDahil / dolar)); $("#euro").html(moneyFormat(ToplamKDVDahil / euro)); } function setSCity(city) { $.ajax({ url: "include/ajaxLib.php?act=setCitySession&city=" + city, type: "GET", success: function (data) { //alert(data); window.location.reload(); }, }); } function setSCountry(cnt) { $.ajax({ url: "include/ajaxLib.php?act=setCountrySession&cnt=" + cnt, type: "GET", success: function (data) { //alert(data); window.location.reload(); }, }); } function setFilterSession() { var seoURLAdd = ""; var queryFilter = ""; $("input.filterCheck").each(function () { if ($(this).is(":checked")) { queryFilter += "queryFilter[]=" + $(this).attr("filterKey") + "::" + $(this).attr("filterValue") + "&"; if (seoURLAdd) seoURLAdd += "-"; seoURLAdd += $(this).attr("filterKey") + "_" + $(this).attr("filterValue"); } }); if ($("#fiyat_slider3").length) queryFilter += "queryFilter[]=" + $("#fiyat_slider3").attr("filterKey") + "::" + $("#fiyat_slider3").val().replace(";", " - ") + "&"; $.ajax({ url: "include/ajaxLib.php?act=setFilterSession", type: "POST", data: queryFilter, success: function (data) { //alert(data); data = decodeEntities(data); window.location.href = data; return; var url = window.location.href; url = url.replace(/page=[0-9]*/i, "page=1&"); url = url.replace(/-p.[0-9]*\-/i, "_filter__" + seoURLAdd + "-p1-"); // window.location.href = data; }, }); } function decodeEntities(html) { var txt = document.createElement("textarea"); txt.innerHTML = html; return txt.value; } var mouseX, mouseY; $(document) .mousemove(function (e) { mouseX = e.pageX; mouseY = e.pageY; }) .mouseover(); // call the handler immediately function bindCCFunctions() { $("input.cardno").bind("keydown", function (event) { if (event.keyCode == 32) { return false; } }); //$('input[name$="cardno"],input.cardno').keypad({keypadOnly:false}); $(".card-number").change(function () { if ($(this).hasClass("est-card-number")) return; if ($(this).val().length == 4) { $(this).next().focus(); } }); $(".card-number").keyup(function () { if ($(this).hasClass("est-card-number")) return; if ($(this).val().length == 4) { $(this).next().focus(); } }); $("span.button") .parents("form:first") .submit(function () { if (!stopSubmit) $(this).find("span.button").html(lang_lutfenBekleyin); }); } function sleep(milliseconds) { var start = new Date().getTime(); for (var i = 0; i < 1e7; i++) { if (new Date().getTime() - start > milliseconds) { break; } } } function saveSiparisForm(formID, op) { if (!formID) return; $.ajax({ type: "POST", url: "page.php?act=satinal&op=adres", data: $("#" + formID).serialize(), success: function (response) { $.ajax({ type: "GET", url: "page.php?act=onay&tp=" + op + "&viewPopup=1&r=" + Math.random(), success: function (response) { $(".fancybox-inner textarea").html( $(response).find("textarea").html() ); }, }); }, }); } $(document).ready(function () { // device detection if ( /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test( navigator.userAgent ) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test( navigator.userAgent.substr(0, 4) ) ) isMobile = true; $("#gf_email").keyup(function (e) { if (e.which === 32) return false; }); $("#gf_ceptel,#gf_evtel,#gf_istel,.input-tel input").mask("(Z00) 000-0000", { translation: { Z: { pattern: /[1-9]/, optional: false, }, }, }); $("#gf_ebulten,#ebultenSMS").val("1"); if ($(".basket-wrap").parent().width() < 1000) $(".basket-wrap").addClass("basket-tek"); $(".basket-wrap").css("visibility", "visible"); alerter = new Alerter(); $("input[name=odemeSelect]:checked").click(); $("#gf_odemeTipi").change(function () { sepetSecimGuncelle($(this).val(), 0); }); $(".karlastirma-liste-checkbox").click(function () { if ($(this).is(":checked")) karsilastirmaEkle($(this).attr("id").replace("k_", "")); else karsilastirmaKaldir($(this).attr("id").replace("k_", "")); }); // $('.qty').change(function() { sepetAdetGuncelle($(this).attr('id').replace('sepetadet_',''),$(this).val()); return false; }); // $('ul.urunSecim_ozellik1detay li').addClass('renk filterCheck').each(function() { $(this).addClass($(this).attr('value')); }) $("#gf_ceptel_alanKodu,#gf_istel_alanKodu,#gf_evtel_alanKodu").keyup( function (e) { if ($(this).val().length == 4) $("#" + $(this).attr("id").replace("alanKodu", "tel")).focus(); } ); $("input[name=uye-tipi]").click(function () { $(".bireysel,.kurumsal").hide(); var className = $(this).attr("id"); $("." + className).show(); }); $("input[name=uye-tipi]:first").click(); $("#urunsirala input").click(function () { $("#urunsirala").submit(); }); $("a.viewStnOB").fancybox({ beforeLoad: function () { var formID = $("a.viewStnOB").parent().attr("formID"); saveSiparisForm(formID, "onsatis"); }, scrolling: "no", padding: 10, centerOnScroll: true, href: "page.php?act=onay&tp=onsatis&viewPopup=1&r=" + Math.random(), type: "ajax", 'onCleanup': function () { var myContent = this.href; $(myContent).unwrap(); } }); $("a.viewStnKVKK").fancybox({ beforeLoad: function () { var formID = $("a.viewStnKVKK").parent().attr("formID"); saveSiparisForm(formID, "kvkk"); }, scrolling: "no", padding: 10, centerOnScroll: true, href: "page.php?act=onay&tp=kvkk&viewPopup=1&r=" + Math.random(), type: "ajax", 'onCleanup': function () { var myContent = this.href; $(myContent).unwrap(); } }); $("a.viewStnSAK").fancybox({ beforeLoad: function () { var formID = $("a.viewStnSAK").parent().attr("formID"); saveSiparisForm(formID, "satinalma"); }, scrolling: "no", padding: 10, centerOnScroll: true, href: "page.php?act=onay&tp=satinalma&viewPopup=1&r=" + Math.random(), type: "ajax", 'onCleanup': function () { var myContent = this.href; $(myContent).unwrap(); } }); $("#shopphp-payment-title-step1").click(function () { $("#shopphp-payment-body-step2,#shopphp-payment-body-step3").hide("fast"); if ($("#shopphp-payment-body-step1").find("input").length) { $("#shopphp-payment-body-step1").show("fast"); } else { $("#shopphp-payment-body-step1").show("fast").html(ajaxLoaderDiv()); $.get("include/ajaxLib.php?act=viewForm", function (data) { $("#shopphp-payment-body-step1").html(data); }); } }); $("#shopphp-payment-title-step2").click(function () { if ($("#shopphp-payment-body-step1").find(".sf-button").length) { $("#shopphp-payment-body-step1").find(".sf-button").click(); } else { $("#shopphp-payment-body-step2").show("fast").html(ajaxLoaderDiv()); $.get("include/ajaxLib.php?act=siparisOdemeSecim", function (data) { $("#shopphp-payment-body-step2").show("fast").html(data); if ($(data).find("input").length) $("#shopphp-payment-body-step1,#shopphp-payment-body-step3").hide( "fast" ); }); } }); $("select.urunSecim").change(function () { var varurl = ""; var url = ""; var selectName = $(this).attr("name"); var currentID = parseInt( selectName.replace("ozellik", "").replace("detay", "") ); for (i = 1; i <= 10; i++) { if ($("select[name=ozellik" + i + "detay]").length) varurl += "&var" + i + "=" + encodeURIComponent($("select[name=ozellik" + i + "detay]").val()); if (i > currentID) { $("select[name=ozellik" + i + "detay]") .attr("disabled", "disabled") .val(""); } } if ($("select[name=ozellik" + (currentID + 1) + "detay]").length) { url = "include/ajaxLib.php?act=varSelectUpdate&seq=" + (currentID + 1) + "&urunID=" + encodeURIComponent($("select[name=ozellik1detay]").attr("urunID")) + varurl; $.get(url, function (data) { $("select[name=ozellik" + (currentID + 1) + "detay]").removeAttr( "disabled" ); if (data) $("select[name=ozellik" + (currentID + 1) + "detay]").html(data); }); } url = "include/ajaxLib.php?act=varKodKontrol&urunID=" + encodeURIComponent($("select[name=ozellik1detay]").attr("urunID")) + varurl; $.get(url, function (data) { if (data) $("#spUrunKodu").text(data); }); updateVarResim( $(this).attr("urunID"), $(this).attr("varID"), $(this).val() ); ajaxFiyatGuncelle($(this).attr("urunID")); }); $(".filterComboSelect").change(function () { var id = $(this).attr("formid"); $("#" + id).submit(); }); $('input[type="submit"]').click(function () { $(this).removeAttr("disabled"); }); $("div.button").click(function () { $(this).find("input").removeAttr("disabled").click(); }); $(".dec,.azalt").click(function () { var simdiAdet = parseFloat($(".urunSepeteEkleAdet").val()); if (simdiAdet > 1) simdiAdet--; $(".urunSepeteEkleAdet").val(simdiAdet); return false; }); $(".inc,.arttir").click(function () { var simdiAdet = parseFloat($(".urunSepeteEkleAdet").val()); simdiAdet++; $(".urunSepeteEkleAdet").val(simdiAdet); return false; }); $("#fatura").click(function () { if ($(this).is(":checked")) $(".fatura").show(); else $(".fatura").hide(); }); $('input[type="password"]').val(""); $(".tooltip").tooltipster({ animation: "slide", speed: 100 }); $(".iconListe").parent().css({ position: "relative" }); $("#filterContainer input.filterCheck").change(function () { setFilterSession(); }); $("#gf_password").reviewPassword({ preventWeakSubmit: false, }); $("#gf_kargoFirmaID,#gf_city,#gf_semt").change(function () { if ($("#gf_kargoFirmaID").val() != "") { $.ajax({ url: "include/ajaxLib.php?act=kargoTutar&kargoFirmaID=" + $("#gf_kargoFirmaID").val() + "&data_country=" + encodeURIComponent($("#gf_country").val()) + "&data_city=" + encodeURIComponent($("#gf_city").val()) + "&data_semt=" + encodeURIComponent($("#gf_semt").val()) + "&r=" + Math.random(), success: function (data) { $("#gf_info_kargoFirmaID").removeClass("sf-icon").html(data); }, }); } else $("#gf_info_kargoFirmaID").html(""); }); $(".multiSepetCheckbox").each(function () { msc++; $(this).attr("id", "adet_" + msc); }); $(".multiSepetCheckbox").click(function () { $("#caprazToplamAdet").text($(".multiSepetCheckbox:checked").length); var toplam = 0; $(".multiSepetCheckbox:checked").each(function () { toplam += parseFloat($(this).attr("kazanc")); }); $("#caprazToplamKazanc").text(moneyFormat(toplam)); }); $("li[disabled=disabled]").addClass("disabled"); $("table.teklif input").keyup(teklifFiyatGuncelle); $("#arttir,#azalt").click(function () { var obj = this; $("table.teklif .fiyat").each(function () { if ($(obj).prop("id") == "arttir") $(this).val(moneyFormat($(this).val() * (1 + $("#oran").val() / 100))); else $(this).val(moneyFormat($(this).val() * (1 - $("#oran").val() / 100))); }); teklifFiyatGuncelle(); }); $(".MenuContainer").show(); $(".HarfListe .Harf:last").css({ borderRight: "none" }); $(".SubMenuItem a").each(function () { $(this).css({ marginLeft: $(this).prop("level") * 10 + "px" }); if ($(this).prop("level") == 1) $(this).css({ padding: "0", background: "none" }); }); $(".FilitreKategori").css({ width: $(".FilitreKategoriListe").width() / 3 - 40 + "px", }); $("body").css("overflowX", "hidden"); $(".spSlides").each(function () { var totalSlides = $(this).find(".spSlide").size(); changeSPSlide(this, 0, totalSlides); }); $("#detailSearchKey,.detailSearchKey").autocomplete( "include/ajaxLib.php?act=arama", { minChars: 2, width: 300, multiple: false, matchContains: true, formatItem: formatItem, formatResult: formatResult, selectFirst: false, } ); if (!isMobile) { $("a.fancybox-iframe").fancybox({ type: "iframe", autoSize: true, afterLoad: function () { $.extend(this, {}); }, afterClose: function () { sepetHTMLGuncelle(""); }, }); $(".lightbox:first").each(function () { $(this).find("img:first").attr("data-zoom-image", $(this).attr("href")); }); $(".lightbox:first img").elevateZoom({ gallery: "urunResimListContainer", easing: true, }); $(".lightbox:first img").bind("click", function (e) { var ez = $(".lightbox:first img").data("elevateZoom"); $.fancybox(ez.getGalleryList()); return false; }); if ($(".lightbox img").length == 0) $(".lightbox").fancybox({ openEffect: "elastic", closeEffect: "elastic", helpers: { title: { type: "inside" } }, }); } else { $("#urunResimListContainer a").click(function () { $(".lightbox:first img").attr("src", $(this).attr("data-zoom-image")); }); $(".lightbox").removeAttr("href"); } $("#imgSepetGoster,.imgSepetGoster").click(function () { if ($("body").width() < 700) { window.location.href = "page.php?act=sepet"; return true; } if (!$("#sepetGoster").is(":visible")) { $("#sepetGoster").slideDown(200); $("#sepetGoster").css({ top: mouseY + 40 + "px", left: mouseX - parseInt($("#sepetGoster").width()) + "px", }); } else { $("#sepetGoster").slideUp(200); } return false; }); $(".imgCaptchaRefresh").click(function () { $(this) .parent() .find(".imgCaptcha") .attr({ src: "include/create_captcha.php?u=1&" + Math.random() }); }); $("#gf_country,#gf_country2").change(function () { formCountryChange(this); }); $("#gf_city,#gf_city2").change(function () { formCityChange(this); }); $("#gf_semt").change(function () { if (!$("#gf_semt2").html()) return; var errorID = $(this).prop("id").replace(/gf_/i, "error_"); $("#" + errorID).text(""); $(".generatedForm .button").show(); if ($(this).find("option:selected").attr("kargo") == 0) { $("#" + errorID).text(" " + lang_ilceGonderimYok); $(".generatedForm .button").hide(); } if ( $(this).find("option:selected").attr("fiyatfarki") != 0 && $(this).find("option:selected").attr("fiyatfarki") ) { var str = lang_ilceKargoFark; str = str.replace( /%fark%/i, $(this).find("option:selected").attr("fiyatfarki") ); $("#" + errorID).text(" " + str); } }); if ($("#gf_city").html()) formCityChange($("#gf_city")); if ($("#gf_country").html()) formCountryChange($("#gf_country")); $(".fillAddress").change(function () { var preFix = $(this).attr("addressPrefix"); var pars = "act=addressList&adresID=" + encodeURIComponent($(this).val()); $.ajax({ url: "include/ajaxLib.php?" + pars, success: function (data) { var dataArray = data.split("||"); $("#gf_address" + preFix).val(dataArray[0]); $("#gf_city" + preFix).val(dataArray[1]); var pars = "act=town&cityID=" + dataArray[1]; $.ajax({ url: "include/ajaxLib.php?" + pars, success: function (data) { $("#gf_semt" + preFix).html(data); $("#gf_semt" + preFix).val(dataArray[2]); }, }); }, }); }); $(".sepeteEkleAdet").click(function () { $(this).val(""); }); //$('.sepeteEkleAdet[max=0]').attr('disabled','disabled'); $(".sepeteEkleAdet").keyup(function (e) { var key = e.charCode || e.keyCode || 0; var total = $(this).val(); urunSepeteEkleAdet = total; return; var OK = key == 8 || key == 9 || key == 46 || (key >= 37 && key <= 40) || (key >= 48 && key <= 57) || (key >= 96 && key <= 105); if (is_int(total)) { OK = true; urunSepeteEkleAdet = total; return true; } if (OK) { if (parseInt(total) > $(this).prop("max")) { $(this).val($(this).prop("max")); alerter.show(lang_urunStoguAsanDeger); urunSepeteEkleAdet = $(this).val(); return false; } urunSepeteEkleAdet = total; return true; } else return false; }); bindCCFunctions(); $(".urunSecimTable select").change(updateSecimURL); updateSecimURL(); if (pushAlert.length > 0) alerter.show(pushAlert); $('a[href="#"]').click(function () { return false; }); $(".piyasa-indirim").each(function () { if ($(this).text() == "%" || !$(this).text()) $(this).remove(); }); $(".fancybox").fancybox({ afterLoad: function () { this.wrap.find(".fancybox-inner").css({ overflowY: "auto", overflowX: "hidden", }); }, }); }); function adresSil(obj) { if ( !confirm( "Bu adres silmek istediğinizden emin misiniz? Bu işlem geri alınamaz." ) ) return; $.ajax({ url: "include/mod_SiparisAdresSecim.php?deleteAjaxAddressID=" + $(obj).attr("addressID"), type: "GET", success: function (data) { window.location.reload(); }, }); return false; } function adresKayit(obj, formID) { var checkFor = [ "name", "lastname", "city", "semt", "address", "baslik", "ceptel", ]; for (i = 0; i < checkFor.length; i++) { if ( !$(formID) .find("[name='" + checkFor[i] + "']") .val() ) { alerter.show(lang_eksiksizDoldurun); $(formID) .find("[name='" + checkFor[i] + "']") .focus(); return false; } } if ($(formID).find("[name='ceptel']").val().length < 14) { alerter.show(lang_eksiksizDoldurun); $(formID).find("[name='ceptel']").focus(); return false; } $.ajax({ url: "include/mod_SiparisAdresSecim.php?setAjaxAddressID=" + $(obj).attr("addressID"), type: "POST", data: $(formID).serialize(), success: function (data) { window.location.reload(); }, }); return false; } function adresGuncelle(obj) { $.fancybox({ autoSize: true, href: "include/mod_SiparisAdresSecim.php?getAjaxAddressID=" + $(obj).attr("addressID"), type: "ajax", }); return false; } function updateSecimAppendURL(urunID) { urunSepeteEkleAdet = $(".urunSepeteEkleAdet_" + urunID).val(); if (!urunSepeteEkleAdet) urunSepeteEkleAdet = $(".urunSepeteEkleAdet").val(); if (!urunSepeteEkleAdet) urunSepeteEkleAdet = $(".sepeteEkleAdet").val(); if (!urunSepeteEkleAdet) urunSepeteEkleAdet = 1; secimURLAppend = ""; for (i = 1; i <= 50; i++) { if ( $(".urunSecim.urunSecim_" + urunID + "_ozellik" + i + "detay li.selected") .length ) secimURLAppend += "&ozellik" + i + "detay=" + encodeURIComponent( $( ".urunSecim.urunSecim_" + urunID + "_ozellik" + i + "detay li.selected" ).attr("value") ); } } function updateSecimURL() { if ($(".urunSepeteEkleAdet").length > 0) urunSepeteEkleAdet = parseFloat($(".urunSepeteEkleAdet").val()); secimURL = ""; for (i = 1; i <= 50; i++) { if ($("#urunSecim_ozellik" + i + "detay").val()) secimURL += "&ozellik" + i + "detay=" + encodeURIComponent($("#urunSecim_ozellik" + i + "detay").val()); } if ($("#freeID").val()) secimURL += "&freeID=" + encodeURIComponent($("#freeID").val()); if ($("#combineID").val()) secimURL += "&combineID=" + encodeURIComponent($("#combineID").val()); secimURL += secimURLAppend; } function formCountryChange(obj) { if (!$(obj).val()) return; var cityID = $(obj) .attr("id") .replace(/country/i, "city"); $("#" + cityID).html(""); var semtID = $(obj) .attr("id") .replace(/country/i, "semt"); if ($(obj).val() != "1") $("#" + semtID) .html("") .parent() .hide(); else { $("#" + semtID) .parent() .show(); $("#" + semtID).html(""); } var pars = "act=city&cID=" + $(obj).val(); $.ajax({ url: "include/ajaxLib.php?" + pars, success: function (data) { var selected = $("#" + cityID).attr("secili"); $("#" + cityID).html(data); $("#" + cityID + " option[value='" + selected + "']").attr( "selected", "selected" ); if (isMobile) $("#" + cityID).selectmenu("refresh", true); }, }); return true; } function formCityChange(obj) { if (!$(obj).val()) return; var semtID = $(obj).attr("id").replace(/city/i, "semt"); $("#" + semtID).html(""); var pars = "act=town&for=" + semtID + "&cityID=" + $(obj).val(); if ($("#" + semtID).attr("filter") == "true") pars += "&valid=true"; $.ajax({ url: "include/ajaxLib.php?" + pars, success: function (data) { var selected = $("#" + semtID).attr("secili"); $("#" + semtID).html(data); $("#" + semtID + " option[value='" + selected + "']").attr( "selected", "selected" ); if (isMobile) $("#" + semtID).selectmenu("refresh", true); }, }); return true; } function trim(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g, ""); } function checkSimpleCaptcha(formID) { var pars = "txtCaptcha=" + $("." + formID + "_txtCaptcha").val(); $.ajax({ url: "include/ajaxLib.php?act=simplecaptcha", type: "POST", data: pars, success: function (data) { data = trim(data); if (data == "false" || !data) { alerter.show("Güvenlik kodu hatalı."); } else { $(".formdeger").val(data); $("#" + formID).submit(); } }, }); } function checkCaptcha(formID) { var pars = "recaptcha_challenge_field=" + $("#recaptcha_challenge_field").val() + "&recaptcha_response_field=" + $("#recaptcha_response_field").val(); $.ajax({ url: "include/ajaxLib.php?act=captcha", type: "POST", data: pars, success: function (data) { data = trim(data); if (data == "false" || !data) { alerter.show("Güvenlik kodu hatalı."); Recaptcha.reload(); } else { $(".formdeger").val(data); $("#" + formID).submit(); } }, }); } var ArkadasimaGonderWidth = 450; var ArkadasimaGonderHeight = 440; function arkadasimaGonderPopup(urunID) { window.open( "popup.php?act=arkadasimaGonder&urunID=" + urunID, "_blank", "width=" + ArkadasimaGonderWidth + ",height=" + ArkadasimaGonderHeight ); return false; } function formatItem(row) { return ( ' ' + row[1] ); } function formatResult(row) { return row[1]; //return row[0].replace(/(<.+?>)/gi, ''); } function getHash( clientId, oid, amount, okUrl, failUrl, islemtipi, taksit, rnd, storekey ) { var hash = ""; var taksitstr = ""; if (taksit > 1) taksitstr = taksit; var pars = "act=getHash&clientId=" + clientId + "&oid=" + oid + "&amount=" + amount + "&okUrl=" + okUrl + "&failUrl=" + failUrl + "&islemtipi=" + islemtipi + "&taksit=" + taksitstr + "&rnd=" + rnd + "&storekey=" + storekey; $.ajax({ url: "include/ajaxLib.php?" + pars, success: function (data) { data = trim(data); $("#hash").val(data); }, }); return hash; } function getHashGaranti( strTerminalID, strOrderID, strAmount, strSuccessURL, strErrorURL, strType, taksit, strStoreKey, SecurityData ) { var hash = ""; var taksitstr = ""; if (taksit > 1) taksitstr = taksit; var pars = "act=getHashGaranti&strTerminalID=" + strTerminalID + "&strOrderID=" + strOrderID + "&strAmount=" + strAmount + "&strSuccessURL=" + strSuccessURL + "&strErrorURL=" + strErrorURL + "&strType=" + strType + "&taksit=" + taksitstr + "&strStoreKey=" + strStoreKey + "&SecurityData=" + SecurityData; $.ajax({ url: "include/ajaxLib.php?" + pars, success: function (data) { data = trim(data); $("#hash").val(data); }, }); return hash; } // Üst Kategori Listesi Fonksiyonları var topCatID = 0; var topMarkaID = 0; var urunCatInsert = ""; var urunMarkaInsert = ""; var userNameError = ""; var emailNameError = ""; function checkRegisterStatus() { $("#sp_registerForm span.button").html(lang_lutfenBekleyin); return true; } function checkAvail(value, type) { $.ajax({ url: "include/ajaxLib.php?act=checkAvail&str=" + encodeURIComponent(value) + "&type=" + encodeURIComponent(type), success: function (data) { data = trim(data); if (data != "OK") { if (type == "username") { userNameError = "true"; $("#sp_registerForm .gf_username").focus(); alerter.show(data); } if (type == "email" && userNameError == "false") { emailNameError = "true"; $("#sp_registerForm .gf_email").focus(); alerter.show(data); } } else { if (type == "username") { userNameError = "false"; } if (type == "email") { emailNameError = "false"; } } if (userNameError == "false" && emailNameError == "false") $("#sp_registerForm .generatedForm").submit(); }, }); } function updateSubCats(sID) { document.getElementById("opt2").options.length = 1; document.getElementById("opt2").options[0].text = lang_lutfenBekleyin; var url = "include/ajaxLib.php?act=topSubCategory&catID=" + sID; $.ajax({ url: url, success: function (data) { if (data != "" && data.length > 5 && !(lastFocusedId == "gf_" + type)) { upOptions("opt2", data); } }, }); updateSubMarka(sID); } function sistemTeklifeEkle() { var stop = false; var secilenUrunArray = new Array(); var secilenAdetArray = new Array(); for (var i = 1; i <= toplamkategori; i++) { catID = catNum[i]; var urunID = document.getElementById("urunSelected_" + catID).options[ document.getElementById("urunSelected_" + catID).selectedIndex ].value; var stok = urunStok[urunID]; if (stok <= 0) { alerter.show(lang_stoktaOlmayanUrunuEkleyemezsiniz); stop = true; } if (urunID > 0) { secilenUrunArray[secilenUrunArray.length] = urunID; secilenAdetArray[secilenAdetArray.length] = $("#adet_" + catID).val(); } } if (secilenUrunArray.length > 0 && stop == false) { document.getElementById("SistemSepeteEkleDiv").innerHTML = '
    ' + lang_lutfenBekleyin + "
    "; //alert(secilenUrunArray.length); for (var i = 0; i < secilenUrunArray.length; i++) { var url = "include/ajaxLib.php?act=teklifEkle&urunID=" + secilenUrunArray[i] + "&adet=" + secilenAdetArray[i]; //window.open(url); if (i < secilenUrunArray.length - 1) { $.get(url, function (data) {}); } else { $.get(url, function (data) { window.location = siteDizini + "page.php?act=tekliflerim"; }); } } window.location = siteDizini + "page.php?act=tekliflerim"; } } function hizliUrunGoster(urunID) { if (isMobile) return goUrun(urunID); $.fancybox({ type: "iframe", autoSize: true, href: "popup.php?act=urunDetay&urunID=" + urunID, afterClose: function () { sepetHTMLGuncelle(""); }, }); return false; } function quickLogin(name, password) { var url = "include/ajaxLib.php?act=quickCheckUser&username=" + encodeURIComponent(name) + "&password=" + encodeURIComponent(password); $.get(url, function (data) { if (data) { location.reload(true); } else alerter.show(lang_hataliKullaniciVeyaSifre); }); return false; } function quickRegister(name, lastname, email, password, gsm, sex, rule) { if (!name || !lastname || !email || !password || !gsm || !sex) { alerter.show(lang_eksiksizDoldurun); return false; } if (!rule) { alerter.show("Lütfen kurallar bölümünü onaylayın."); return false; } var url = "include/ajaxLib.php?act=quickRegister&name=" + encodeURIComponent(name) + "&lastname=" + encodeURIComponent(lastname) + "&email=" + encodeURIComponent(email) + "&pass=" + encodeURIComponent(password) + "&gsm=" + encodeURIComponent(gsm) + "&sex=" + encodeURIComponent(sex); $.get(url, function (data) { if (data == "ue") alerter.show(lang_epostaDahaOnceAlinmis); else { quickLogin(email, password); } }); return false; } function quickContact( name, nameValidate, email, emailValidate, tel, telValidate, msg, msgValidate ) { var stop = false; if (nameValidate && !name) stop = true; else if (emailValidate && !email) stop = true; else if (telValidate && !tel) stop = true; else if (msgValidate && !msg) stop = true; if (stop) alerter.show(lang_eksiksizDoldurun); else if (emailValidate && !Validate_Email_Address(email)) alerter.show(lang_hataliEposta); else { $.ajax({ url: "include/ajaxLib.php?act=quickContact&urunID=0&namelastname=" + encodeURIComponent(name) + "&ceptel=" + encodeURIComponent($("#tel").val()) + "&email=" + encodeURIComponent($("#xemail").val()), success: function (data) { alerter.show(lang_iletisimOK); }, }); } return false; } function teklifSepetEkle() { $(".teklifInfoTable").html('
    '); $(".teklifUrunID").each(function () { var url = "include/ajaxLib.php?act=sepetEkle&urunID=" + encodeURIComponent($(this).text()) + "&adet=" + $(this).parent().find(".adet").val(); $.get(url, function (data) {}); }); setTimeout(function () { window.location = siteDizini + "page.php?act=sepet"; }, 3000); } function sistemSepeteEkle() { var stop = false; var secilenUrunArray = new Array(); var secilenAdetArray = new Array(); for (var i = 1; i <= toplamkategori; i++) { catID = catNum[i]; var urunID = $("#urunSelected_" + catID).val(); var stok = urunStok[urunID]; if (stok <= 0) { alerter.show(lang_stoktaOlmayanUrunuEkleyemezsiniz); stop = true; } if (urunID > 0) { secilenUrunArray[secilenUrunArray.length] = urunID; secilenAdetArray[secilenAdetArray.length] = $("#adet_" + catID).val(); } } if (secilenUrunArray.length > 0 && stop == false) { document.getElementById("SistemSepeteEkleDiv").innerHTML = '
    ' + lang_lutfenBekleyin + "
    "; //alert(secilenUrunArray.length); for (var i = 0; i < secilenUrunArray.length; i++) { var url = "include/ajaxLib.php?act=sepetEkle&urunID=" + encodeURIComponent(secilenUrunArray[i]) + "&adet=" + encodeURIComponent(secilenAdetArray[i]); if (i < secilenUrunArray.length - 1) { $.get(url, function (data) {}); } else { $.get(url, function (data) { setTimeout(function () { window.location.href = siteDizini + "page.php?act=sepet"; }, 2000); }); } } // window.location = 'page.php?act=sepet'; } } function updateSubMarka(sID) { document.getElementById("opt3").options.length = 1; document.getElementById("opt3").options[0].text = lang_lutfenBekleyin; var pars = "act=topSubMarka&catID=" + sID; $.ajax({ url: "include/ajaxLib.php?act=topSubMarka&catID=" + sID, success: function (data) { upOptions("opt3", data); }, }); topCatID = document.getElementById("opt2").selectedIndex >= 0 ? document.getElementById("opt2").options[ document.getElementById("opt2").selectedIndex ].value : document.getElementById("opt1").options[ document.getElementById("opt1").selectedIndex ].value; } function upOptions(id, result) { document.getElementById(id).options.length = 0; var optsArray = result.split("||"); for (var i = 0; i < optsArray.length; i++) { var optDataArray = optsArray[i].split("$$"); optDataArray[1] = optDataArray[1].replace("'", "'"); document.getElementById(id).options[ document.getElementById(id).options.length ] = new Option(optDataArray[1], optDataArray[0]); } } // Üst Kategori Listesi Fonksiyonları var toplamkdvdahil = 0; var toplamkdvharic = 0; var toplamkdv = 0; var KDVHaricArray = new Array(); function updateToplam() { var is = document.getElementsByTagName("input"); toplamkdvdahil = 0; toplamkdvharic = 0; toplamkdv = 0; for (var i = 0; i < is.length; i++) { if (is[i].id.indexOf("fiyat_") == 0) { var realID = is[i].id.replace("fiyat_", ""); toplamkdvdahil += parseFloat(is[i].value); if (KDVHaricArray[realID]) toplamkdvharic += parseFloat(KDVHaricArray[realID]); } } toplamkdv = toplamkdvdahil - toplamkdvharic; document.getElementById("kdvdahil").innerHTML = moneyFormat(toplamkdvdahil); //document.getElementById('kdvharic').innerHTML = moneyFormat(toplamkdvharic); document.getElementById("toplamytl").innerHTML = moneyFormat(toplamkdvdahil); //document.getElementById('toplamkdv').innerHTML = moneyFormat(toplamkdv); document.getElementById("dolar").innerHTML = moneyFormat( toplamkdvdahil / dolar ); document.getElementById("euro").innerHTML = moneyFormat( toplamkdvdahil / euro ); if (document.getElementById("havaleile")) document.getElementById("havaleile").innerHTML = moneyFormat( toplamkdvdahil - toplamkdvdahil * havaleindirim ); } function updateKategori(urunID) { var url = "include/ajaxLib.php"; var catID = 0; var data = ""; var myAjax = new Array(); for (var i = 2; i <= updatekategori; i++) { catID = catNum[i]; var pars = "act=updateKategori&urunID=" + urunID + "&catID=" + catID + "&randID=" + Math.floor(Math.random() * 1000000); var target = "catNum_" + i; if (urunID > 0) { pcTopLoading(i); $("#" + target).load("include/ajaxLib.php?" + pars); } up("adet_" + catID, 0); up("fiyat_" + catID, 0); document.getElementById("detail_href_" + catID).href = "#"; document.getElementById("detail_href_" + catID).target = "_self"; ch("stok_" + catID, "stok_def_" + catID); KDVHaricArray[catID] = 0; } updateToplam(); } function pcTopLoading(i) { document.getElementById("catNum_" + i).innerHTML = ' '; } function pcTopLoaded(response, i) { document.getElementById("catNum_" + i).innerHTML = response.responseText; } function updateFiyat(urunID, catID) { var fiyat = urunFiyat[urunID]; var stok = urunStok[urunID]; up("adet_" + catID, 1); if (fiyat > 0) up("fiyat_" + catID, moneyFormat(fiyat)); if (urunID > 0) { if (stok > 0) ch("stok_" + catID, "stok_var_" + catID); else { ch("stok_" + catID, "stok_yok_" + catID); up("adet_" + catID, 0); up("fiyat_" + catID, 0); } } else { ch("stok_" + catID, "stok_def_" + catID); up("adet_" + catID, 0); up("fiyat_" + catID, 0); } if (stok > 0) KDVHaricArray[catID] = urunKDVHaricFiyat[urunID]; document.getElementById("detail_href_" + catID).href = urunID > 0 ? "page.php?act=urunDetay&urunID=" + urunID : "#"; document.getElementById("detail_href_" + catID).target = urunID > 0 ? "_blank" : "_self"; updateToplam(); } function updateAdet(v, catID) { var xID = "#urunSelected_" + catID; var urunID = $(xID).val(); if (v == 0 || !v) KDVHaricArray[catID] = 0; else KDVHaricArray[catID] = urunKDVHaricFiyat[urunID] * v; var urunID = document.getElementById("urunSelected_" + catID).options[ document.getElementById("urunSelected_" + catID).selectedIndex ].value; var fiyat = urunFiyat[urunID]; var stok = urunStok[urunID]; if (!isInt(v)) { alerter.show(lutfenSadeceRakkamKullanin); v = urunID > 0 && stok > 0 ? 1 : 0; up("adet_" + catID, v); } else if (v > stok) { alerter.show(lang_stoktlarimizdaYok); up("adet_" + catID, stok); v = stok; } if (urunID > 0) up("fiyat_" + catID, moneyFormat(fiyat * v)); updateToplam(); } function ShowDetailPic(catID) { var urunID = document.getElementById("urunSelected_" + catID).options[ document.getElementById("urunSelected_" + catID).selectedIndex ].value; document.getElementById("detail_div_" + catID).innerHTML = ''; if (urunResim[urunID]) document.getElementById("detail_div_" + catID).style.display = "block"; } // PC Toplama Fonksiyonları function moneyFormat(number) { var decimalplaces = 2; var decimalcharacter = "."; var thousandseparater = ","; number = parseFloat(number); var sign = number < 0 ? "-" : ""; var formatted = new String(number.toFixed(decimalplaces)); if (decimalcharacter.length && decimalcharacter != ".") { formatted = formatted.replace(/\./, decimalcharacter); } var integer = ""; var fraction = ""; var strnumber = new String(formatted); var dotpos = decimalcharacter.length ? strnumber.indexOf(decimalcharacter) : -1; if (dotpos > -1) { if (dotpos) { integer = strnumber.substr(0, dotpos); } fraction = strnumber.substr(dotpos + 1); } else { integer = strnumber; } if (integer) { integer = String(Math.abs(integer)); } while (fraction.length < decimalplaces) { fraction += "0"; } temparray = new Array(); while (integer.length > 3) { temparray.unshift(integer.substr(-3)); integer = integer.substr(0, integer.length - 3); } temparray.unshift(integer); integer = temparray.join(thousandseparater); var out = sign + integer + decimalcharacter + fraction; if(kurusgizle) out = out.replace('.00',''); return out; } function moneyFormat2(V) { var intPart, decPart; ret = V * 100; ret = Math.round(ret); ret = V < 0.1 ? "0" + ret : ret; ret = V < 1 ? "0" + ret : "" + ret; intPart = ret.substring(0, ret.length - 2); decPart = ret.substring(ret.length - 2); ret = intPart + "." + decPart; if (ret.indexOf("-") >= 0) ret = ret.replace("00", ""); return ret; } function pause(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } function isInt(x) { var y = parseInt(x); if (isNaN(y)) return false; return x == y && x.toString() == y.toString(); } function gv(id) { if (document.getElementById(id)) return document.getElementById(id).value; else alert("DEBUG gv : " + id + " -> NOID."); } function up(id, v) { if (document.getElementById(id)) document.getElementById(id).value = v; else alert("DEBUG up : " + id + " -> NOID."); } function ch(oldid, newid) { if (!document.getElementById(oldid)) alert("DEBUG ch : " + oldid + " -> NOID."); if (!document.getElementById(newid)) alert("DEBUG ch : " + newid + " -> NOID."); document.getElementById(oldid).innerHTML = document.getElementById( newid ).innerHTML; } function openTab(id) { if ( $("#fancyTabContainer").html() != null && $("#fancyTabContainer").html() != "" ) { id++; $("#fancyTabContainer .tabs1 li:eq(" + id + ")").click(); return; } //if (lastTabID == id) return; var cont = false; { if (lastTabID) $("#tabData" + lastTabID).hide("fast"); $("#tabData" + id).show("fast"); $("#tabData" + id + " .imgCaptchaRefresh").click(); lastTabID = id; cont = true; } for (var i = 1; i <= 10; i++) { if (document.getElementById("option" + i)) { document.getElementById("option" + i).style.backgroundPosition = "0% 0px"; document .getElementById("option" + i) .getElementsByTagName("span")[0].style.backgroundPosition = "100% 0px"; } } if (cont && document.getElementById("option" + id) != null) { document.getElementById("option" + id).style.backgroundPosition = "0% -42px"; document .getElementById("option" + id) .getElementsByTagName("span")[0].style.backgroundPosition = "100% -42px"; } } function flash(w, h, u, t) { document.write( "" ); document.write(""); document.write( "" ); } function Validate_Email_Address(email) { $("#gf_email").val($("#gf_email").val().replace(/ /g, "")); email.replace(/ /g, ""); var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } function trFix(string) { //string = string.replace(/y/g,'ı'); //string = string.replace(/?/g,'ş'); //string = string.replace(/?/g,'ğ'); return string; } function sssOpen(ID) { if (lastSSSID) { $("#sss_cevap_" + lastSSSID).slideUp("fast"); $("#sss_image_" + lastSSSID).attr({ src: "images/sss_close.gif" }); } if (lastSSSID != ID) { $("#sss_cevap_" + ID).slideDown("fast"); $("#sss_image_" + ID).attr({ src: "images/sss_open.gif" }); lastSSSID = ID; } else lastSSSID = 0; } function fc(obj) { obj.innerHTML = obj.innerHTML + ''; document.getElementById("sb").click(); } function pencereAc(url, en, boy) { var y = window.top.outerHeight / 2 + window.top.screenY - boy / 2; var x = window.top.outerWidth / 2 + window.top.screenX - en / 2; window .open( url, "shopphp", "height=" + boy + ",width=" + en + ",status=no,toolbar=no,menubar=no,location=no,scrollbars=1, top=" + y + ", left=" + x ) .focus(); } function is_int(input) { return typeof input == "number" && parseInt(input) == input; } function bookmark() { if (window.sidebar) { // Mozilla Firefox Bookmark window.sidebar.addPanel(location.href, document.title, ""); } else if (window.external) { // IE Favorite window.external.AddFavorite(location.href, document.title); } else if (window.opera && window.print) { // Opera Hotlist this.title = document.title; return true; } } function liftOff() { window.location.reload(); } function errorAlert(str) { swal({ title: "Hata!", text: str, icon: "error", button: lang_OK, }); } function ugFiyat(lineID) { swal("Ürün Yeni Fiyatını Girin:", { content: "input", button: "Güncelle", }).then(function (value) { $.get( "include/ajaxLib.php?act=userGroupFiyat&lineID=" + lineID + "&fiyat=" + value, function (data) { if (data == "err") { swal({ title: "Hata!", text: "Fiyat güncellenmedi.", icon: "error", button: lang_OK, }); } else { sepetHTMLGuncelle(data); swal({ title: "", text: "Fiyat güncellendi.", icon: "success", button: lang_OK, }); } } ); }); } var lang_urunStoguAsanDeger = 'Ürün stoğunu aşan bir değer girdiniz. Değer stok sayısı ile değiştirildi.'; var lang_yukleniyor = 'Yükleniyor ..'; var lang_lutfenBekleyin = 'Lütfen bekleyin ...'; var lang_kullaniciAdiDahaOnceAlinmis = '

    Bu kullanıcı adı daha önce alınmış. Lütfen farklı bir kullanıcı adı girin.

    '; var lang_epostaDahaOnceAlinmis = 'Bu E-Posta adresi daha önce sisteme kayıt edilmiş.'; var lang_stoktaOlmayanUrunuEkleyemezsiniz = 'Stokta bulunmayan ürünü sepete ekleyemezsiniz.'; var lang_stoktlarimizdaYok = 'Stoklarımızda girdiğiniz adet kadar ürün bulunmamaktadır.'; var lang_lutfenSadeceRakkamKullanin = 'Lütfen adet girişlerinde sadece rakkam kullanın.'; var lang_onaySepet = 'Onay şıkkını işaretlemeden, ürünü sepete atamazsınız.'; var lang_urunVarSecim = 'Lütfen ürün varyasyon seçiminizi yapın.'; var lang_urunAnaVarSecim = 'Lütfen önce ürün ana varyasyon seçiminizi yapın.'; var lang_urunDefaIncelendi = '%urunadi% son 24 saatte %gosterim% defa incelendi.'; var lang_karsilastirmaEklendi = 'Ürün karşılaştırma listesine eklendi.'; var lang_listeEklendi = 'Ürün listenize eklendi.'; var lang_secimStokYok = 'İlgili seçim stokta bulunmamaktadır.'; var lang_ilceGonderimYok = 'Bu ilceye gonderimimiz yoktur.'; var lang_ilceKargoFark = 'Bu ilceye %fark% TL kargo farki uygulanmaktadır.'; var lang_hataliKullaniciVeyaSifre = 'Hatalı kullanıcı adı ve/veya şifre'; var lang_eksiksizDoldurun = 'Lütfen bilgileri eksiksiz doldurun'; var lang_hataliEposta = 'Hatalı e-posta adresi.'; var lang_iletisimOK = 'Sizinle ek kısa sürede iletişime geçeceğiz. Teşekkürler.'; var lang_sifreGuvenligi = 'Şifre Güvenliği'; var lang_karsilastirmaKaldirildi = 'Ürün karşılaştırma listenizden kaldırıldı.'; var lang_OK = 'Tamam'; var siteDizini = '/';