/*! * 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) 2012 Andrew Eades * www.elevateweb.co.uk * * Dual licensed under the GPL and MIT licenses. * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License * /* * jQuery elevateZoom 3.0.3 * Demo's and documentation: * www.elevateweb.co.uk/image-zoom * * Copyright (c) 2012 Andrew Eades * www.elevateweb.co.uk * * Dual licensed under the GPL and MIT licenses. * http://en.wikipedia.org/wiki/MIT_License * http://en.wikipedia.org/wiki/GNU_General_Public_License */ if ( typeof Object.create !== 'function' ) { Object.create = function( obj ) { function F() {}; F.prototype = obj; return new F(); }; } (function( $, window, document, undefined ) { var ElevateZoom = { init: function( options, elem ) { var self = this; self.elem = elem; self.$elem = $( elem ); self.imageSrc = self.$elem.data("zoom-image") ? self.$elem.data("zoom-image") : self.$elem.attr("src"); self.options = $.extend( {}, $.fn.elevateZoom.options, options ); //TINT OVERRIDE SETTINGS if(self.options.tint) { self.options.lensColour = "none", //colour of the lens background self.options.lensOpacity = "1" //opacity of the lens } //INNER OVERRIDE SETTINGS if(self.options.zoomType == "inner") {self.options.showLens = false;} //Remove alt on hover self.$elem.parent().removeAttr('title').removeAttr('alt'); self.zoomImage = self.imageSrc; self.refresh( 1 ); //Create the image swap from the gallery $('#'+self.options.gallery + ' a').click( function(e) { //Set a class on the currently active gallery image if(self.options.galleryActiveClass){ $('#'+self.options.gallery + ' a').removeClass(self.options.galleryActiveClass); $(this).addClass(self.options.galleryActiveClass); } //stop any link on the a tag from working e.preventDefault(); //call the swap image function if($(this).data("zoom-image")){self.zoomImagePre = $(this).data("zoom-image")} else{self.zoomImagePre = $(this).data("image");} self.swaptheimage($(this).data("image"), self.zoomImagePre); return false; }); }, refresh: function( length ) { var self = this; setTimeout(function() { self.fetch(self.imageSrc); }, length || self.options.refresh ); }, fetch: function(imgsrc) { //get the image var self = this; var newImg = new Image(); newImg.onload = function() { //set the large image dimensions - used to calculte ratio's self.largeWidth = newImg.width; self.largeHeight = newImg.height; //once image is loaded start the calls self.startZoom(); self.currentImage = self.imageSrc; //let caller know image has been loaded self.options.onZoomedImageLoaded(self.$elem); } newImg.src = imgsrc; // this must be done AFTER setting onload return; }, startZoom: function( ) { var self = this; //get dimensions of the non zoomed image self.nzWidth = self.$elem.width(); self.nzHeight = self.$elem.height(); //activated elements self.isWindowActive = false; self.isLensActive = false; self.isTintActive = false; self.overWindow = false; //CrossFade Wrappe if(self.options.imageCrossfade){ self.zoomWrap = self.$elem.wrap('
'); self.$elem.css('position', 'absolute'); } self.zoomLock = 1; self.scrollingLock = false; self.changeBgSize = false; self.currentZoomLevel = self.options.zoomLevel; //get offset of the non zoomed image self.nzOffset = self.$elem.offset(); //calculate the width ratio of the large/small image self.widthRatio = (self.largeWidth/self.currentZoomLevel) / self.nzWidth; self.heightRatio = (self.largeHeight/self.currentZoomLevel) / self.nzHeight; //if window zoom if(self.options.zoomType == "window") { self.zoomWindowStyle = "overflow: hidden;" + "background-position: 0px 0px;text-align:center;" + "background-color: " + String(self.options.zoomWindowBgColour) + ";width: " + String(self.options.zoomWindowWidth) + "px;" + "height: " + String(self.options.zoomWindowHeight) + "px;float: left;" + "background-size: "+ self.largeWidth/self.currentZoomLevel+ "px " +self.largeHeight/self.currentZoomLevel + "px;" + "display: none;z-index:100;" + "border: " + String(self.options.borderSize) + "px solid " + self.options.borderColour + ";background-repeat: no-repeat;" + "position: absolute;"; } //if inner zoom if(self.options.zoomType == "inner") { //has a border been put on the image? Lets cater for this var borderWidth = self.$elem.css("border-left-width"); self.zoomWindowStyle = "overflow: hidden;" + "margin-left: " + String(borderWidth) + ";" + "margin-top: " + String(borderWidth) + ";" + "background-position: 0px 0px;" + "width: " + String(self.nzWidth) + "px;" + "height: " + String(self.nzHeight) + "px;" + "px;float: left;" + "display: none;" + "cursor:"+(self.options.cursor)+";" + "px solid " + self.options.borderColour + ";background-repeat: no-repeat;" + "position: absolute;"; } //lens style for window zoom if(self.options.zoomType == "window") { // adjust images less than the window height if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight = self.nzHeight; } else{ lensHeight = String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.largeWidth < self.options.zoomWindowWidth){ lensWidth = self.nzWidth; } else{ lensWidth = (self.options.zoomWindowWidth/self.widthRatio); } self.lensStyle = "background-position: 0px 0px;width: " + String((self.options.zoomWindowWidth)/self.widthRatio) + "px;height: " + String((self.options.zoomWindowHeight)/self.heightRatio) + "px;float: right;display: none;" + "overflow: hidden;" + "z-index: 999;" + "-webkit-transform: translateZ(0);" + "opacity:"+(self.options.lensOpacity)+";filter: alpha(opacity = "+(self.options.lensOpacity*100)+"); zoom:1;" + "width:"+lensWidth+"px;" + "height:"+lensHeight+"px;" + "background-color:"+(self.options.lensColour)+";" + "cursor:"+(self.options.cursor)+";" + "border: "+(self.options.lensBorderSize)+"px" + " solid "+(self.options.lensBorderColour)+";background-repeat: no-repeat;position: absolute;"; } //tint style self.tintStyle = "display: block;" + "position: absolute;" + "background-color: "+self.options.tintColour+";" + "filter:alpha(opacity=0);" + "opacity: 0;" + "width: " + self.nzWidth + "px;" + "height: " + self.nzHeight + "px;" ; //lens style for lens zoom with optional round for modern browsers self.lensRound = ''; if(self.options.zoomType == "lens") { self.lensStyle = "background-position: 0px 0px;" + "float: left;display: none;" + "border: " + String(self.options.borderSize) + "px solid " + self.options.borderColour+";" + "width:"+ String(self.options.lensSize) +"px;" + "height:"+ String(self.options.lensSize)+"px;" + "background-repeat: no-repeat;position: absolute;"; } //does not round in all browsers if(self.options.lensShape == "round") { self.lensRound = "border-top-left-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;" + "border-top-right-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;" + "border-bottom-left-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;" + "border-bottom-right-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;"; } //create the div's + "" //self.zoomContainer = $('
').addClass('zoomContainer').css({"position":"relative", "height":self.nzHeight, "width":self.nzWidth}); self.zoomContainer = $('
'); $('body').append(self.zoomContainer); //this will add overflow hidden and contrain the lens on lens mode if(self.options.containLensZoom && self.options.zoomType == "lens"){ self.zoomContainer.css("overflow", "hidden"); } if(self.options.zoomType != "inner") { self.zoomLens = $("
 
") .appendTo(self.zoomContainer) .click(function () { self.$elem.trigger('click'); }); if(self.options.tint) { self.tintContainer = $('
').addClass('tintContainer'); self.zoomTint = $("
"); self.zoomLens.wrap(self.tintContainer); self.zoomTintcss = self.zoomLens.after(self.zoomTint); //if tint enabled - set an image to show over the tint self.zoomTintImage = $('') .appendTo(self.zoomLens) .click(function () { self.$elem.trigger('click'); }); } } //create zoom window if(isNaN(self.options.zoomWindowPosition)){ self.zoomWindow = $("
 
") .appendTo('body') .click(function () { self.$elem.trigger('click'); }); }else{ self.zoomWindow = $("
 
") .appendTo(self.zoomContainer) .click(function () { self.$elem.trigger('click'); }); } self.zoomWindowContainer = $('
').addClass('zoomWindowContainer').css("width",self.options.zoomWindowWidth); self.zoomWindow.wrap(self.zoomWindowContainer); // self.captionStyle = "text-align: left;background-color: black;color: white;font-weight: bold;padding: 10px;font-family: sans-serif;font-size: 11px"; // self.zoomCaption = $('
INSERT ALT TAG
').appendTo(self.zoomWindow.parent()); if(self.options.zoomType == "lens") { self.zoomLens.css({ backgroundImage: "url('" + self.imageSrc + "')" }); } if(self.options.zoomType == "window") { self.zoomWindow.css({ backgroundImage: "url('" + self.imageSrc + "')" }); } if(self.options.zoomType == "inner") { self.zoomWindow.css({ backgroundImage: "url('" + self.imageSrc + "')" }); } /*-------------------END THE ZOOM WINDOW AND LENS----------------------------------*/ //touch events self.$elem.bind('touchmove', function(e){ e.preventDefault(); var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; self.setPosition(touch); }); self.zoomContainer.bind('touchmove', function(e){ if(self.options.zoomType == "inner") { self.showHideWindow("show"); } e.preventDefault(); var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; self.setPosition(touch); }); self.zoomContainer.bind('touchend', function(e){ self.showHideWindow("hide"); if(self.options.showLens) {self.showHideLens("hide");} if(self.options.tint && self.options.zoomType != "inner") {self.showHideTint("hide");} }); self.$elem.bind('touchend', function(e){ self.showHideWindow("hide"); if(self.options.showLens) {self.showHideLens("hide");} if(self.options.tint && self.options.zoomType != "inner") {self.showHideTint("hide");} }); if(self.options.showLens) { self.zoomLens.bind('touchmove', function(e){ e.preventDefault(); var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; self.setPosition(touch); }); self.zoomLens.bind('touchend', function(e){ self.showHideWindow("hide"); if(self.options.showLens) {self.showHideLens("hide");} if(self.options.tint && self.options.zoomType != "inner") {self.showHideTint("hide");} }); } //Needed to work in IE self.$elem.bind('mousemove', function(e){ if(self.overWindow == false){self.setElements("show");} //make sure on orientation change the setposition is not fired if(self.lastX !== e.clientX || self.lastY !== e.clientY){ self.setPosition(e); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; }); self.zoomContainer.bind('mousemove', function(e){ if(self.overWindow == false){self.setElements("show");} //make sure on orientation change the setposition is not fired if(self.lastX !== e.clientX || self.lastY !== e.clientY){ self.setPosition(e); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; }); if(self.options.zoomType != "inner") { self.zoomLens.bind('mousemove', function(e){ //make sure on orientation change the setposition is not fired if(self.lastX !== e.clientX || self.lastY !== e.clientY){ self.setPosition(e); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; }); } if(self.options.tint && self.options.zoomType != "inner") { self.zoomTint.bind('mousemove', function(e){ //make sure on orientation change the setposition is not fired if(self.lastX !== e.clientX || self.lastY !== e.clientY){ self.setPosition(e); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; }); } if(self.options.zoomType == "inner") { self.zoomWindow.bind('mousemove', function(e) { //self.overWindow = true; //make sure on orientation change the setposition is not fired if(self.lastX !== e.clientX || self.lastY !== e.clientY){ self.setPosition(e); self.currentLoc = e; } self.lastX = e.clientX; self.lastY = e.clientY; }); } // lensFadeOut: 500, zoomTintFadeIn self.zoomContainer.add(self.$elem).mouseenter(function(){ if(self.overWindow == false){self.setElements("show");} }).mouseleave(function(){ if(!self.scrollLock){ self.setElements("hide"); self.options.onDestroy(self.$elem); } }); //end ove image if(self.options.zoomType != "inner") { self.zoomWindow.mouseenter(function(){ self.overWindow = true; self.setElements("hide"); }).mouseleave(function(){ self.overWindow = false; }); } //end ove image // var delta = parseInt(e.originalEvent.wheelDelta || -e.originalEvent.detail); // $(this).empty(); // return false; //fix for initial zoom setting if (self.options.zoomLevel != 1){ // self.changeZoomLevel(self.currentZoomLevel); } //set the min zoomlevel if(self.options.minZoomLevel){ self.minZoomLevel = self.options.minZoomLevel; } else{ self.minZoomLevel = self.options.scrollZoomIncrement * 2; } if(self.options.scrollZoom){ self.zoomContainer.add(self.$elem).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function(e){ // in IE there is issue with firing of mouseleave - So check whether still scrolling // and on mouseleave check if scrolllock self.scrollLock = true; clearTimeout($.data(this, 'timer')); $.data(this, 'timer', setTimeout(function() { self.scrollLock = false; //do something }, 250)); var theEvent = e.originalEvent.wheelDelta || e.originalEvent.detail*-1 //this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30; // e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); e.preventDefault(); if(theEvent /120 > 0) { //scrolling up if(self.currentZoomLevel >= self.minZoomLevel){ self.changeZoomLevel(self.currentZoomLevel-self.options.scrollZoomIncrement); } } else{ //scrolling down if(self.options.maxZoomLevel){ if(self.currentZoomLevel <= self.options.maxZoomLevel){ self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement); } } else{ //andy self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement); } } return false; }); } }, setElements: function(type) { var self = this; if(!self.options.zoomEnabled){return false;} if(type=="show"){ if(self.isWindowSet){ if(self.options.zoomType == "inner") {self.showHideWindow("show");} if(self.options.zoomType == "window") {self.showHideWindow("show");} if(self.options.showLens) {self.showHideLens("show");} if(self.options.tint && self.options.zoomType != "inner") {self.showHideTint("show"); } } } if(type=="hide"){ if(self.options.zoomType == "window") {self.showHideWindow("hide");} if(!self.options.tint) {self.showHideWindow("hide");} if(self.options.showLens) {self.showHideLens("hide");} if(self.options.tint) { self.showHideTint("hide");} } }, setPosition: function(e) { var self = this; if(!self.options.zoomEnabled){return false;} //recaclc offset each time in case the image moves //this can be caused by other on page elements self.nzHeight = self.$elem.height(); self.nzWidth = self.$elem.width(); self.nzOffset = self.$elem.offset(); if(self.options.tint && self.options.zoomType != "inner") { self.zoomTint.css({ top: 0}); self.zoomTint.css({ left: 0}); } //set responsive //will checking if the image needs changing before running this code work faster? if(self.options.responsive && !self.options.scrollZoom){ if(self.options.showLens){ if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight = self.nzHeight; } else{ lensHeight = String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.largeWidth < self.options.zoomWindowWidth){ lensWidth = self.nzWidth; } else{ lensWidth = (self.options.zoomWindowWidth/self.widthRatio); } self.widthRatio = self.largeWidth / self.nzWidth; self.heightRatio = self.largeHeight / self.nzHeight; if(self.options.zoomType != "lens") { //possibly dont need to keep recalcalculating //if the lens is heigher than the image, then set lens size to image size if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight = self.nzHeight; } else{ lensHeight = String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.nzWidth < self.options.zoomWindowHeight/self.heightRatio){ lensWidth = self.nzWidth; } else{ lensWidth = String((self.options.zoomWindowWidth/self.widthRatio)); } self.zoomLens.css('width', lensWidth); self.zoomLens.css('height', lensHeight); if(self.options.tint){ self.zoomTintImage.css('width', self.nzWidth); self.zoomTintImage.css('height', self.nzHeight); } } if(self.options.zoomType == "lens") { self.zoomLens.css({ width: String(self.options.lensSize) + 'px', height: String(self.options.lensSize) + 'px' }) } //end responsive image change } } //container fix self.zoomContainer.css({ top: self.nzOffset.top}); self.zoomContainer.css({ left: self.nzOffset.left}); self.mouseLeft = parseInt(e.pageX - self.nzOffset.left); self.mouseTop = parseInt(e.pageY - self.nzOffset.top); //calculate the Location of the Lens //calculate the bound regions - but only if zoom window if(self.options.zoomType == "window") { self.Etoppos = (self.mouseTop < (self.zoomLens.height()/2)); self.Eboppos = (self.mouseTop > self.nzHeight - (self.zoomLens.height()/2)-(self.options.lensBorderSize*2)); self.Eloppos = (self.mouseLeft < 0+((self.zoomLens.width()/2))); self.Eroppos = (self.mouseLeft > (self.nzWidth - (self.zoomLens.width()/2)-(self.options.lensBorderSize*2))); } //calculate the bound regions - but only for inner zoom if(self.options.zoomType == "inner"){ self.Etoppos = (self.mouseTop < ((self.nzHeight/2)/self.heightRatio) ); self.Eboppos = (self.mouseTop > (self.nzHeight - ((self.nzHeight/2)/self.heightRatio))); self.Eloppos = (self.mouseLeft < 0+(((self.nzWidth/2)/self.widthRatio))); self.Eroppos = (self.mouseLeft > (self.nzWidth - (self.nzWidth/2)/self.widthRatio-(self.options.lensBorderSize*2))); } // if the mouse position of the slider is one of the outerbounds, then hide window and lens if (self.mouseLeft < 0 || self.mouseTop < 0 || self.mouseLeft > self.nzWidth || self.mouseTop > self.nzHeight ) { self.setElements("hide"); return; } //else continue with operations else { //lens options if(self.options.showLens) { // self.showHideLens("show"); //set background position of lens self.lensLeftPos = String(Math.floor(self.mouseLeft - self.zoomLens.width() / 2)); self.lensTopPos = String(Math.floor(self.mouseTop - self.zoomLens.height() / 2)); } //adjust the background position if the mouse is in one of the outer regions //Top region if(self.Etoppos){ self.lensTopPos = 0; } //Left Region if(self.Eloppos){ self.windowLeftPos = 0; self.lensLeftPos = 0; self.tintpos=0; } //Set bottom and right region for window mode if(self.options.zoomType == "window") { if(self.Eboppos){ self.lensTopPos = Math.max( (self.nzHeight)-self.zoomLens.height()-(self.options.lensBorderSize*2), 0 ); } if(self.Eroppos){ self.lensLeftPos = (self.nzWidth-(self.zoomLens.width())-(self.options.lensBorderSize*2)); } } //Set bottom and right region for inner mode if(self.options.zoomType == "inner") { if(self.Eboppos){ self.lensTopPos = Math.max( ((self.nzHeight)-(self.options.lensBorderSize*2)), 0 ); } if(self.Eroppos){ self.lensLeftPos = (self.nzWidth-(self.nzWidth)-(self.options.lensBorderSize*2)); } } //if lens zoom if(self.options.zoomType == "lens") { self.windowLeftPos = String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomLens.width() / 2) * (-1)); self.windowTopPos = String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomLens.height() / 2) * (-1)); self.zoomLens.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' }); if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType == "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } else{ if(self.options.zoomType == "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.changeBgSize = false; } self.setWindowPostition(e); } //if tint zoom if(self.options.tint && self.options.zoomType != "inner") { self.setTintPosition(e); } //set the css background position if(self.options.zoomType == "window") { self.setWindowPostition(e); } if(self.options.zoomType == "inner") { self.setWindowPostition(e); } if(self.options.showLens) { if(self.fullwidth && self.options.zoomType != "lens"){ self.lensLeftPos = 0; } self.zoomLens.css({ left: self.lensLeftPos + 'px', top: self.lensTopPos + 'px' }) } } //end else }, showHideWindow: function(change) { var self = this; if(change == "show"){ if(!self.isWindowActive){ if(self.options.zoomWindowFadeIn){ self.zoomWindow.stop(true, true, false).fadeIn(self.options.zoomWindowFadeIn); } else{self.zoomWindow.show();} self.isWindowActive = true; } } if(change == "hide"){ if(self.isWindowActive){ if(self.options.zoomWindowFadeOut){ self.zoomWindow.stop(true, true).fadeOut(self.options.zoomWindowFadeOut, function () { if (self.loop) { //stop moving the zoom window when zoom window is faded out clearInterval(self.loop); self.loop = false; } }); } else{self.zoomWindow.hide();} self.isWindowActive = false; } } }, showHideLens: function(change) { var self = this; if(change == "show"){ if(!self.isLensActive){ if(self.options.lensFadeIn){ self.zoomLens.stop(true, true, false).fadeIn(self.options.lensFadeIn); } else{self.zoomLens.show();} self.isLensActive = true; } } if(change == "hide"){ if(self.isLensActive){ if(self.options.lensFadeOut){ self.zoomLens.stop(true, true).fadeOut(self.options.lensFadeOut); } else{self.zoomLens.hide();} self.isLensActive = false; } } }, showHideTint: function(change) { var self = this; if(change == "show"){ if(!self.isTintActive){ if(self.options.zoomTintFadeIn){ self.zoomTint.css({opacity:self.options.tintOpacity}).animate().stop(true, true).fadeIn("slow"); } else{ self.zoomTint.css({opacity:self.options.tintOpacity}).animate(); self.zoomTint.show(); } self.isTintActive = true; } } if(change == "hide"){ if(self.isTintActive){ if(self.options.zoomTintFadeOut){ self.zoomTint.stop(true, true).fadeOut(self.options.zoomTintFadeOut); } else{self.zoomTint.hide();} self.isTintActive = false; } } }, setLensPostition: function( e ) { }, setWindowPostition: function( e ) { //return obj.slice( 0, count ); var self = this; if(!isNaN(self.options.zoomWindowPosition)){ switch (self.options.zoomWindowPosition) { case 1: //done self.windowOffsetTop = (self.options.zoomWindowOffety);//DONE - 1 self.windowOffsetLeft =(+self.nzWidth); //DONE 1, 2, 3, 4, 16 break; case 2: if(self.options.zoomWindowHeight > self.nzHeight){ //positive margin self.windowOffsetTop = ((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1); self.windowOffsetLeft =(self.nzWidth); //DONE 1, 2, 3, 4, 16 } else{ //negative margin } break; case 3: //done self.windowOffsetTop = (self.nzHeight - self.zoomWindow.height() - (self.options.borderSize*2)); //DONE 3,9 self.windowOffsetLeft =(self.nzWidth); //DONE 1, 2, 3, 4, 16 break; case 4: //done self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 self.windowOffsetLeft =(self.nzWidth); //DONE 1, 2, 3, 4, 16 break; case 5: //done self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 self.windowOffsetLeft =(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2)); //DONE - 5,15 break; case 6: if(self.options.zoomWindowHeight > self.nzHeight){ //positive margin self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 self.windowOffsetLeft =((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1); } else{ //negative margin } break; case 7: //done self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 self.windowOffsetLeft = 0; //DONE 7, 13 break; case 8: //done self.windowOffsetTop = (self.nzHeight); //DONE - 4,5,6,7,8 self.windowOffsetLeft =(self.zoomWindow.width()+(self.options.borderSize*2) )* (-1); //DONE 8,9,10,11,12 break; case 9: //done self.windowOffsetTop = (self.nzHeight - self.zoomWindow.height() - (self.options.borderSize*2)); //DONE 3,9 self.windowOffsetLeft =(self.zoomWindow.width()+(self.options.borderSize*2) )* (-1); //DONE 8,9,10,11,12 break; case 10: if(self.options.zoomWindowHeight > self.nzHeight){ //positive margin self.windowOffsetTop = ((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1); self.windowOffsetLeft =(self.zoomWindow.width()+(self.options.borderSize*2) )* (-1); //DONE 8,9,10,11,12 } else{ //negative margin } break; case 11: self.windowOffsetTop = (self.options.zoomWindowOffety); self.windowOffsetLeft =(self.zoomWindow.width()+(self.options.borderSize*2) )* (-1); //DONE 8,9,10,11,12 break; case 12: //done self.windowOffsetTop = (self.zoomWindow.height()+(self.options.borderSize*2))*(-1); //DONE 12,13,14,15,16 self.windowOffsetLeft =(self.zoomWindow.width()+(self.options.borderSize*2) )* (-1); //DONE 8,9,10,11,12 break; case 13: //done self.windowOffsetTop = (self.zoomWindow.height()+(self.options.borderSize*2))*(-1); //DONE 12,13,14,15,16 self.windowOffsetLeft =(0); //DONE 7, 13 break; case 14: if(self.options.zoomWindowHeight > self.nzHeight){ //positive margin self.windowOffsetTop = (self.zoomWindow.height()+(self.options.borderSize*2))*(-1); //DONE 12,13,14,15,16 self.windowOffsetLeft =((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1); } else{ //negative margin } break; case 15://done self.windowOffsetTop = (self.zoomWindow.height()+(self.options.borderSize*2))*(-1); //DONE 12,13,14,15,16 self.windowOffsetLeft =(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2)); //DONE - 5,15 break; case 16: //done self.windowOffsetTop = (self.zoomWindow.height()+(self.options.borderSize*2))*(-1); //DONE 12,13,14,15,16 self.windowOffsetLeft =(self.nzWidth); //DONE 1, 2, 3, 4, 16 break; default: //done self.windowOffsetTop = (self.options.zoomWindowOffety);//DONE - 1 self.windowOffsetLeft =(self.nzWidth); //DONE 1, 2, 3, 4, 16 } } //end isNAN else{ //WE CAN POSITION IN A CLASS - ASSUME THAT ANY STRING PASSED IS self.externalContainer = $('#'+self.options.zoomWindowPosition); self.externalContainerWidth = self.externalContainer.width(); self.externalContainerHeight = self.externalContainer.height(); self.externalContainerOffset = self.externalContainer.offset(); self.windowOffsetTop = self.externalContainerOffset.top;//DONE - 1 self.windowOffsetLeft =self.externalContainerOffset.left; //DONE 1, 2, 3, 4, 16 } self.isWindowSet = true; self.windowOffsetTop = self.windowOffsetTop + self.options.zoomWindowOffety; self.windowOffsetLeft = self.windowOffsetLeft + self.options.zoomWindowOffetx; self.zoomWindow.css({ top: self.windowOffsetTop}); self.zoomWindow.css({ left: self.windowOffsetLeft}); if(self.options.zoomType == "inner") { self.zoomWindow.css({ top: 0}); self.zoomWindow.css({ left: 0}); } self.windowLeftPos = String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1)); self.windowTopPos = String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1)); if(self.Etoppos){self.windowTopPos = 0;} if(self.Eloppos){self.windowLeftPos = 0;} if(self.Eboppos){self.windowTopPos = (self.largeHeight/self.currentZoomLevel-self.zoomWindow.height())*(-1); } if(self.Eroppos){self.windowLeftPos = ((self.largeWidth/self.currentZoomLevel-self.zoomWindow.width())*(-1));} //stops micro movements if(self.fullheight){ self.windowTopPos = 0; } if(self.fullwidth){ self.windowLeftPos = 0; } //set the css background position if(self.options.zoomType == "window" || self.options.zoomType == "inner") { if(self.zoomLock == 1){ //overrides for images not zoomable if(self.widthRatio <= 1){ self.windowLeftPos = 0; } if(self.heightRatio <= 1){ self.windowTopPos = 0; } } // adjust images less than the window height if (self.options.zoomType == "window") { if (self.largeHeight < self.options.zoomWindowHeight) { self.windowTopPos = 0; } if (self.largeWidth < self.options.zoomWindowWidth) { self.windowLeftPos = 0; } } //set the zoomwindow background position if (self.options.easing){ // if(self.changeZoom){ // clearInterval(self.loop); // self.changeZoom = false; // self.loop = false; // } //set the pos to 0 if not set if(!self.xp){self.xp = 0;} if(!self.yp){self.yp = 0;} //if loop not already started, then run it if (!self.loop){ self.loop = setInterval(function(){ //using zeno's paradox self.xp += (self.windowLeftPos - self.xp) / self.options.easingAmount; self.yp += (self.windowTopPos - self.yp) / self.options.easingAmount; if(self.scrollingLock){ clearInterval(self.loop); self.xp = self.windowLeftPos; self.yp = self.windowTopPos self.xp = ((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1); self.yp = (((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1)); if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType == "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } else{ if(self.options.zoomType != "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } /* if(!self.bgxp){self.bgxp = self.largeWidth/self.newvalue;} if(!self.bgyp){self.bgyp = self.largeHeight/self.newvalue ;} if (!self.bgloop){ self.bgloop = setInterval(function(){ self.bgxp += (self.largeWidth/self.newvalue - self.bgxp) / self.options.easingAmount; self.bgyp += (self.largeHeight/self.newvalue - self.bgyp) / self.options.easingAmount; self.zoomWindow.css({ "background-size": self.bgxp + 'px ' + self.bgyp + 'px' }); }, 16); } */ self.changeBgSize = false; } self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' }); self.scrollingLock = false; self.loop = false; } else if (Math.round(Math.abs(self.xp - self.windowLeftPos) + Math.abs(self.yp - self.windowTopPos)) < 1) { //stops micro movements clearInterval(self.loop); self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' }); self.loop = false; } else{ if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType == "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } else{ if(self.options.zoomType != "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } self.changeBgSize = false; } self.zoomWindow.css({ backgroundPosition: self.xp + 'px ' + self.yp + 'px' }); } }, 16); } } else{ if(self.changeBgSize){ if(self.nzHeight>self.nzWidth){ if(self.options.zoomType == "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } else{ if(self.options.zoomType == "lens"){ self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } if((self.largeHeight/self.newvaluewidth) < self.options.zoomWindowHeight){ self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' }); } else{ self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' }); } } self.changeBgSize = false; } self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' }); } } }, setTintPosition: function(e){ var self = this; self.nzOffset = self.$elem.offset(); self.tintpos = String(((e.pageX - self.nzOffset.left)-(self.zoomLens.width() / 2)) * (-1)); self.tintposy = String(((e.pageY - self.nzOffset.top) - self.zoomLens.height() / 2) * (-1)); if(self.Etoppos){ self.tintposy = 0; } if(self.Eloppos){ self.tintpos=0; } if(self.Eboppos){ self.tintposy = (self.nzHeight-self.zoomLens.height()-(self.options.lensBorderSize*2))*(-1); } if(self.Eroppos){ self.tintpos = ((self.nzWidth-self.zoomLens.width()-(self.options.lensBorderSize*2))*(-1)); } if(self.options.tint) { //stops micro movements if(self.fullheight){ self.tintposy = 0; } if(self.fullwidth){ self.tintpos = 0; } self.zoomTintImage.css({'left': self.tintpos+'px'}); self.zoomTintImage.css({'top': self.tintposy+'px'}); } }, swaptheimage: function(smallimage, largeimage){ var self = this; var newImg = new Image(); if(self.options.loadingIcon){ self.spinner = $('
'); self.$elem.after(self.spinner); } self.options.onImageSwap(self.$elem); newImg.onload = function() { self.largeWidth = newImg.width; self.largeHeight = newImg.height; self.zoomImage = largeimage; self.zoomWindow.css({ "background-size": self.largeWidth + 'px ' + self.largeHeight + 'px' }); self.swapAction(smallimage, largeimage); return; } newImg.src = largeimage; // this must be done AFTER setting onload }, swapAction: function(smallimage, largeimage){ var self = this; var newImg2 = new Image(); newImg2.onload = function() { //re-calculate values self.nzHeight = newImg2.height; self.nzWidth = newImg2.width; self.options.onImageSwapComplete(self.$elem); self.doneCallback(); return; } newImg2.src = smallimage; //reset the zoomlevel to that initially set in options self.currentZoomLevel = self.options.zoomLevel; self.options.maxZoomLevel = false; //swaps the main image //self.$elem.attr("src",smallimage); //swaps the zoom image if(self.options.zoomType == "lens") { self.zoomLens.css({ backgroundImage: "url('" + largeimage + "')" }); } if(self.options.zoomType == "window") { self.zoomWindow.css({ backgroundImage: "url('" + largeimage + "')" }); } if(self.options.zoomType == "inner") { self.zoomWindow.css({ backgroundImage: "url('" + largeimage + "')" }); } self.currentImage = largeimage; if(self.options.imageCrossfade){ var oldImg = self.$elem; var newImg = oldImg.clone(); self.$elem.attr("src",smallimage) self.$elem.after(newImg); newImg.stop(true).fadeOut(self.options.imageCrossfade, function() { $(this).remove(); }); // if(self.options.zoomType == "inner"){ //remove any attributes on the cloned image so we can resize later self.$elem.width("auto").removeAttr("width"); self.$elem.height("auto").removeAttr("height"); // } oldImg.fadeIn(self.options.imageCrossfade); if(self.options.tint && self.options.zoomType != "inner") { var oldImgTint = self.zoomTintImage; var newImgTint = oldImgTint.clone(); self.zoomTintImage.attr("src",largeimage) self.zoomTintImage.after(newImgTint); newImgTint.stop(true).fadeOut(self.options.imageCrossfade, function() { $(this).remove(); }); oldImgTint.fadeIn(self.options.imageCrossfade); //self.zoomTintImage.attr("width",elem.data("image")); //resize the tint window self.zoomTint.css({ height: self.$elem.height()}); self.zoomTint.css({ width: self.$elem.width()}); } self.zoomContainer.css("height", self.$elem.height()); self.zoomContainer.css("width", self.$elem.width()); if(self.options.zoomType == "inner"){ if(!self.options.constrainType){ self.zoomWrap.parent().css("height", self.$elem.height()); self.zoomWrap.parent().css("width", self.$elem.width()); self.zoomWindow.css("height", self.$elem.height()); self.zoomWindow.css("width", self.$elem.width()); } } if(self.options.imageCrossfade){ self.zoomWrap.css("height", self.$elem.height()); self.zoomWrap.css("width", self.$elem.width()); } } else{ self.$elem.attr("src",smallimage); if(self.options.tint) { self.zoomTintImage.attr("src",largeimage); //self.zoomTintImage.attr("width",elem.data("image")); self.zoomTintImage.attr("height",self.$elem.height()); //self.zoomTintImage.attr('src') = elem.data("image"); self.zoomTintImage.css({ height: self.$elem.height()}); self.zoomTint.css({ height: self.$elem.height()}); } self.zoomContainer.css("height", self.$elem.height()); self.zoomContainer.css("width", self.$elem.width()); if(self.options.imageCrossfade){ self.zoomWrap.css("height", self.$elem.height()); self.zoomWrap.css("width", self.$elem.width()); } } if(self.options.constrainType){ //This will contrain the image proportions if(self.options.constrainType == "height"){ self.zoomContainer.css("height", self.options.constrainSize); self.zoomContainer.css("width", "auto"); if(self.options.imageCrossfade){ self.zoomWrap.css("height", self.options.constrainSize); self.zoomWrap.css("width", "auto"); self.constwidth = self.zoomWrap.width(); } else{ self.$elem.css("height", self.options.constrainSize); self.$elem.css("width", "auto"); self.constwidth = self.$elem.width(); } if(self.options.zoomType == "inner"){ self.zoomWrap.parent().css("height", self.options.constrainSize); self.zoomWrap.parent().css("width", self.constwidth); self.zoomWindow.css("height", self.options.constrainSize); self.zoomWindow.css("width", self.constwidth); } if(self.options.tint){ self.tintContainer.css("height", self.options.constrainSize); self.tintContainer.css("width", self.constwidth); self.zoomTint.css("height", self.options.constrainSize); self.zoomTint.css("width", self.constwidth); self.zoomTintImage.css("height", self.options.constrainSize); self.zoomTintImage.css("width", self.constwidth); } } if(self.options.constrainType == "width"){ self.zoomContainer.css("height", "auto"); self.zoomContainer.css("width", self.options.constrainSize); if(self.options.imageCrossfade){ self.zoomWrap.css("height", "auto"); self.zoomWrap.css("width", self.options.constrainSize); self.constheight = self.zoomWrap.height(); } else{ self.$elem.css("height", "auto"); self.$elem.css("width", self.options.constrainSize); self.constheight = self.$elem.height(); } if(self.options.zoomType == "inner"){ self.zoomWrap.parent().css("height", self.constheight); self.zoomWrap.parent().css("width", self.options.constrainSize); self.zoomWindow.css("height", self.constheight); self.zoomWindow.css("width", self.options.constrainSize); } if(self.options.tint){ self.tintContainer.css("height", self.constheight); self.tintContainer.css("width", self.options.constrainSize); self.zoomTint.css("height", self.constheight); self.zoomTint.css("width", self.options.constrainSize); self.zoomTintImage.css("height", self.constheight); self.zoomTintImage.css("width", self.options.constrainSize); } } } }, doneCallback: function(){ var self = this; if(self.options.loadingIcon){ self.spinner.hide(); } self.nzOffset = self.$elem.offset(); self.nzWidth = self.$elem.width(); self.nzHeight = self.$elem.height(); // reset the zoomlevel back to default self.currentZoomLevel = self.options.zoomLevel; //ratio of the large to small image self.widthRatio = self.largeWidth / self.nzWidth; self.heightRatio = self.largeHeight / self.nzHeight; //NEED TO ADD THE LENS SIZE FOR ROUND // adjust images less than the window height if(self.options.zoomType == "window") { if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ lensHeight = self.nzHeight; } else{ lensHeight = String((self.options.zoomWindowHeight/self.heightRatio)) } if(self.options.zoomWindowWidth < self.options.zoomWindowWidth){ lensWidth = self.nzWidth; } else{ lensWidth = (self.options.zoomWindowWidth/self.widthRatio); } if(self.zoomLens){ self.zoomLens.css('width', lensWidth); self.zoomLens.css('height', lensHeight); } } }, getCurrentImage: function(){ var self = this; return self.zoomImage; }, getGalleryList: function(){ var self = this; //loop through the gallery options and set them in list for fancybox self.gallerylist = []; if (self.options.gallery){ $('#'+self.options.gallery + ' a').each(function() { var img_src = ''; if($(this).data("zoom-image")){ img_src = $(this).data("zoom-image"); } else if($(this).data("image")){ img_src = $(this).data("image"); } //put the current image at the start if(img_src == self.zoomImage){ self.gallerylist.unshift({ href: ''+img_src+'', title: $(this).find('img').attr("title") }); } else{ self.gallerylist.push({ href: ''+img_src+'', title: $(this).find('img').attr("title") }); } }); } //if no gallery - return current image else{ self.gallerylist.push({ href: ''+self.zoomImage+'', title: $(this).find('img').attr("title") }); } return self.gallerylist; }, changeZoomLevel: function(value){ var self = this; //flag a zoom, so can adjust the easing during setPosition self.scrollingLock = true; //round to two decimal places self.newvalue = parseFloat(value).toFixed(2); newvalue = parseFloat(value).toFixed(2); //maxwidth & Maxheight of the image maxheightnewvalue = self.largeHeight/((self.options.zoomWindowHeight / self.nzHeight) * self.nzHeight); maxwidthtnewvalue = self.largeWidth/((self.options.zoomWindowWidth / self.nzWidth) * self.nzWidth); //calculate new heightratio if(self.options.zoomType != "inner") { if(maxheightnewvalue <= newvalue){ self.heightRatio = (self.largeHeight/maxheightnewvalue) / self.nzHeight; self.newvalueheight = maxheightnewvalue; self.fullheight = true; } else{ self.heightRatio = (self.largeHeight/newvalue) / self.nzHeight; self.newvalueheight = newvalue; self.fullheight = false; } // calculate new width ratio if(maxwidthtnewvalue <= newvalue){ self.widthRatio = (self.largeWidth/maxwidthtnewvalue) / self.nzWidth; self.newvaluewidth = maxwidthtnewvalue; self.fullwidth = true; } else{ self.widthRatio = (self.largeWidth/newvalue) / self.nzWidth; self.newvaluewidth = newvalue; self.fullwidth = false; } if(self.options.zoomType == "lens"){ if(maxheightnewvalue <= newvalue){ self.fullwidth = true; self.newvaluewidth = maxheightnewvalue; } else{ self.widthRatio = (self.largeWidth/newvalue) / self.nzWidth; self.newvaluewidth = newvalue; self.fullwidth = false; }} } if(self.options.zoomType == "inner") { maxheightnewvalue = parseFloat(self.largeHeight/self.nzHeight).toFixed(2); maxwidthtnewvalue = parseFloat(self.largeWidth/self.nzWidth).toFixed(2); if(newvalue > maxheightnewvalue){ newvalue = maxheightnewvalue; } if(newvalue > maxwidthtnewvalue){ newvalue = maxwidthtnewvalue; } if(maxheightnewvalue <= newvalue){ self.heightRatio = (self.largeHeight/newvalue) / self.nzHeight; if(newvalue > maxheightnewvalue){ self.newvalueheight = maxheightnewvalue; }else{ self.newvalueheight = newvalue; } self.fullheight = true; } else{ self.heightRatio = (self.largeHeight/newvalue) / self.nzHeight; if(newvalue > maxheightnewvalue){ self.newvalueheight = maxheightnewvalue; }else{ self.newvalueheight = newvalue; } self.fullheight = false; } if(maxwidthtnewvalue <= newvalue){ self.widthRatio = (self.largeWidth/newvalue) / self.nzWidth; if(newvalue > maxwidthtnewvalue){ self.newvaluewidth = maxwidthtnewvalue; }else{ self.newvaluewidth = newvalue; } self.fullwidth = true; } else{ self.widthRatio = (self.largeWidth/newvalue) / self.nzWidth; self.newvaluewidth = newvalue; self.fullwidth = false; } } //end inner scrcontinue = false; if(self.options.zoomType == "inner"){ if(self.nzWidth >= self.nzHeight){ if( self.newvaluewidth <= maxwidthtnewvalue){ scrcontinue = true; } else{ scrcontinue = false; self.fullheight = true; self.fullwidth = true; } } if(self.nzHeight > self.nzWidth){ if( self.newvaluewidth <= maxwidthtnewvalue){ scrcontinue = true; } else{ scrcontinue = false; self.fullheight = true; self.fullwidth = true; } } } if(self.options.zoomType != "inner"){ scrcontinue = true; } if(scrcontinue){ self.zoomLock = 0; self.changeZoom = true; //if lens height is less than image height if(((self.options.zoomWindowHeight)/self.heightRatio) <= self.nzHeight){ self.currentZoomLevel = self.newvalueheight; if(self.options.zoomType != "lens" && self.options.zoomType != "inner") { self.changeBgSize = true; self.zoomLens.css({height: String((self.options.zoomWindowHeight)/self.heightRatio) + 'px' }) } if(self.options.zoomType == "lens" || self.options.zoomType == "inner") { self.changeBgSize = true; } } if((self.options.zoomWindowWidth/self.widthRatio) <= self.nzWidth){ if(self.options.zoomType != "inner"){ if(self.newvaluewidth > self.newvalueheight) { self.currentZoomLevel = self.newvaluewidth; } } if(self.options.zoomType != "lens" && self.options.zoomType != "inner") { self.changeBgSize = true; self.zoomLens.css({width: String((self.options.zoomWindowWidth)/self.widthRatio) + 'px' }) } if(self.options.zoomType == "lens" || self.options.zoomType == "inner") { self.changeBgSize = true; } } if(self.options.zoomType == "inner"){ self.changeBgSize = true; if(self.nzWidth > self.nzHeight){ self.currentZoomLevel = self.newvaluewidth; } if(self.nzHeight > self.nzWidth){ self.currentZoomLevel = self.newvaluewidth; } } } //under //sets the boundry change, called in setWindowPos self.setPosition(self.currentLoc); // }, closeAll: function(){ if(self.zoomWindow){self.zoomWindow.hide();} if(self.zoomLens){self.zoomLens.hide();} if(self.zoomTint){self.zoomTint.hide();} }, changeState: function(value){ var self = this; if(value == 'enable'){self.options.zoomEnabled = true;} if(value == 'disable'){self.options.zoomEnabled = false;} } }; $.fn.elevateZoom = function( options ) { return this.each(function() { var elevate = Object.create( ElevateZoom ); elevate.init( options, this ); $.data( this, 'elevateZoom', elevate ); }); }; $.fn.elevateZoom.options = { zoomActivation: "hover", // Can also be click (PLACEHOLDER FOR NEXT VERSION) zoomEnabled: true, //false disables zoomwindow from showing preloading: 1, //by default, load all the images, if 0, then only load images after activated (PLACEHOLDER FOR NEXT VERSION) zoomLevel: 1, //default zoom level of image scrollZoom: false, //allow zoom on mousewheel, true to activate scrollZoomIncrement: 0.1, //steps of the scrollzoom minZoomLevel: false, maxZoomLevel: false, easing: false, easingAmount: 12, lensSize: 200, zoomWindowWidth: 400, zoomWindowHeight: 400, zoomWindowOffetx: 0, zoomWindowOffety: 0, zoomWindowPosition: 1, zoomWindowBgColour: "#fff", lensFadeIn: false, lensFadeOut: false, debug: false, zoomWindowFadeIn: false, zoomWindowFadeOut: false, zoomWindowAlwaysShow: false, zoomTintFadeIn: false, zoomTintFadeOut: false, borderSize: 2, showLens: true, borderColour: "#aaa", lensBorderSize: 1, lensBorderColour: "#000", lensShape: "square", //can be "round" zoomType: "window", //window is default, also "lens" available - containLensZoom: false, lensColour: "white", //colour of the lens background lensOpacity: 0.4, //opacity of the lens lenszoom: false, tint: true, //enable the tinting tintColour: "#333", //default tint color, can be anything, red, #ccc, rgb(0,0,0) tintOpacity: 0.4, //opacity of the tint gallery: false, galleryActiveClass: "zoomGalleryActive", imageCrossfade: false, constrainType: false, //width or height constrainSize: false, //in pixels the dimensions you want to constrain on loadingIcon: false, //http://www.example.com/spinner.gif cursor:"default", // user should set to what they want the cursor as, if they have set a click function responsive:true, onComplete: $.noop, onDestroy: function() {}, onZoomedImageLoaded: function() {}, onImageSwap: $.noop, onImageSwapComplete: $.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);; (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);/* 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); (function() { ! function(a, b) { return b.Alerter = function() { function b(b) { } return b.prototype.show = function(b) { return swal({ // title: "Good job!", text: b, // icon: "success", button: lang_OK, }); }, b.prototype.hide_message = function(a, b) { }, b }() }(this.jQuery, this) }).call(this); 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 = 'Lütfen önce ürün ana varyasyon seçiminizi yapın.'; var lang_urunVarSecim = 'Lütfen beden seçimi yapınız.'; var lang_urunAnaVarSecim = 'Lütfen öbce ü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 = '/';