/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */;(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else
show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else
helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else
helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else
helper.parent.stop().fadeOut(tsettings.fade,complete);}else
complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery);

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 *
 * Open source under the BSD License.
 *
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this list of
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list
 * of conditions and the following disclaimer in the documentation and/or other materials
 * provided with the distribution.
 *
 * Neither the name of the author nor the names of contributors may be used to endorse
 * or promote products derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 *
 * Open source under the BSD License.
 *
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this list of
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list
 * of conditions and the following disclaimer in the documentation and/or other materials
 * provided with the distribution.
 *
 * Neither the name of the author nor the names of contributors may be used to endorse
 * or promote products derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 5/25/2009
 * @author Ariel Flesler
 * @version 1.4.2
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);


/*!
 * jQuery Loupe
 * http://www.userdot.net/#!/jquery
 *
 * Copyright 2011, UserDot www.userdot.net
 * Licensed under the GPL Version 3 license.
 * Version 1.0.0
 *
 */
(function ($) {
    id = 0;
    jQuery.fn.loupe = function (a) {
        id++;
        if (this.length > 1) return this.each(function () {
            $(this).loupe(a)
        }), this;
        var a = $.extend({
            trigger: "mouseenter",
            shape: "circle",
            rounded_corners: 10,
            loupe_toggle_time: "medium",
            loupe_toggle_easing: "linear",
            default_size: 200,
            min_size: 150,
            max_size: 250,
            glossy: !0,
            drop_shadow: !0,
            allow_resize: !0,
            size_snap: 10,
            resize_animation_time: "medium",
            resize_animation_easing: "easeOutBack",
            allow_zoom: !0,
            zoom_key: 90,
            default_zoom: 100,
            min_zoom: 50,
            max_zoom: 200,
            zoom_snap: 5,
            zoom_animation_time: "medium",
            zoom_animation_easing: "easeOutBack",
            apply_overlay: !0,
            overlay_opacity: 0.5,
            overlay_effect_time: "slow",
            overlay_effect_easing: "easeOutBack",
            overlay_class_name: ""
        }, a || {}),
        j = jQuery(this),
        c = "loupe-" + id,
        t = "loupe_overlay-" + id,
        h = a.default_size,
        i, q = null,
        u = 0,
        v = 0,
        x = 0,
        y = 0,
        r = 0,
        s = 0,
        w = !1,
        p = !1,
        k = a.default_zoom,
        n = 0,
        o = 0,
        e, z = !1;
        return this.each(function () {
            function A() {
                var d = h - 2 * $("#" + c + " .glossy").css("marginTop"),
                e = h / 2,
                g = 0,
                f = 0;
                a.shape == "circle" ? f = g = e : a.shape == "rounded" && (g = parseInt($("#" + c).css("border-top-width")), f = g = a.rounded_corners - g);
                $("#" + c + " .glossy").stop();
                $("#" + c + " .glossy").animate({
                    width: d + "px",
                    height: e + "px",
                    "-webkit-border-top-left-radius": g + "px",
                    "-webkit-border-top-right-radius": f + "px",
                    "-moz-border-radius-topleft": g + "px",
                    "-moz-border-radius-topright": f + "px",
                    "border-top-left-radius": g + "px",
                    "border-top-right-radius": f + "px"
                }, {
                    queue: !1,
                    easing: a.resize_animation_easing,
                    duration: a.resize_animation_time
                })
            }
            function B(d, e) {
                if (w && a.allow_zoom) {
                    if (!(k + a.zoom_snap * d > a.max_zoom || k + a.zoom_snap * d < a.min_zoom)) {
                        k += a.zoom_snap * d;
                        $("#log").text("zoom: " + k);
                        r += Math.round(x * a.zoom_snap / 100) * d;
                        s += Math.round(y * a.zoom_snap / 100) * d;
                        var g = e.pageY - this.offsetTop;
                        n = Math.round(r / u * (e.pageX - this.offsetLeft)) * -1 + h / 2;
                        o = Math.round(s / v * g) * -1 + h / 2;
                        $("#" + c).animate({
                            "background-position": n + "px " + o + "px",
                            "background-size": r + "px " + s + "px"
                        }, {
                            queue: !1,
                            easing: a.zoom_animation_easing,
                            duration: a.zoom_animation_time,
                            complete: function () {
                                i = $("#" + c).outerWidth();
                                var a = new jQuery.Event("mousemove", {
                                    pageX: m + i / 2,
                                    pageY: l + i / 2
                                });
                                j.trigger(a)
                            }
                        })
                    }
                } else if (a.allow_resize && !w && (g = d * a.size_snap, !(h + g > a.max_size || h + g < a.min_size))) {
                    h += g;
                    var f = 0,
                    m = Math.round($("#" + c).offset().left - g),
                    l = Math.round($("#" + c).offset().top - g);
                    n += g;
                    o += g;
                    $("#" + c).stop();
                    a.shape == "circle" ? (f = h / 2, $("#" + c).animate({
                        width: h + "px",
                        height: h + "px",
                        "-webkit-border-top-left-radius": f + "px",
                        "-webkit-border-top-right-radius": f + "px",
                        "-webkit-border-bottom-left-radius": f + "px",
                        "-webkit-border-bottom-right-radius": f + "px",
                        "-moz-border-radius-topleft": f + "px",
                        "-moz-border-radius-topright": f + "px",
                        "-moz-border-radius-bottomleft": f + "px",
                        "-moz-border-radius-bottomright": f + "px",
                        "border-top-left-radius": f + "px",
                        "border-top-right-radius": f + "px",
                        "border-bottom-left-radius": f + "px",
                        "border-bottom-right-radius": f + "px",
                        "background-position": n + "px " + o + "px",
                        left: m + "px",
                        top: l + "px"
                    }, {
                        queue: !1,
                        easing: a.resize_animation_easing,
                        duration: a.resize_animation_time,
                        complete: function () {
                            i = $("#" + c).outerWidth();
                            var a = new jQuery.Event("mousemove", {
                                pageX: m + i / 2,
                                pageY: l + i / 2
                            });
                            j.trigger(a)
                        }
                    })) : a.shape == "rounded" ? $("#" + c).animate({
                        width: h + "px",
                        height: h + "px",
                        "-webkit-border-radius": a.rounded_corners,
                        "-moz-border-radius": a.rounded_corners,
                        "border-radius": a.rounded_corners,
                        "background-position": n + "px " + o + "px",
                        left: m + "px",
                        top: l + "px"
                    }, {
                        queue: !1,
                        easing: a.resize_animation_easing,
                        duration: a.resize_animation_time,
                        complete: function () {
                            i = $("#" + c).outerWidth();
                            var a = new jQuery.Event("mousemove", {
                                pageX: m + i / 2,
                                pageY: l + i / 2
                            });
                            j.trigger(a)
                        }
                    }) : a.shape == "square" && $("#" + c).animate({
                        width: h + "px",
                        height: h + "px",
                        "background-position": n + "px " + o + "px",
                        left: m + "px",
                        top: l + "px"
                    }, {
                        queue: !1,
                        easing: a.resize_animation_easing,
                        duration: a.resize_animation_time,
                        complete: function () {
                            i = $("#" + c).outerWidth();
                            var a = new jQuery.Event("mousemove", {
                                pageX: m + i / 2,
                                pageY: l + i / 2
                            });
                            j.trigger(a)
                        }
                    });
                    a.glossy && A()
                }
            }
            jQuery.browser.webkit && document.readyState != "complete" ? setTimeout(arguments.callee, 100) : (function () {
                j.is("a") ? (q = j.attr("href"), e = j.find("img")) : j.is("img") && (q = j.attr("src"), e = j);
                jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 9 && (z = !0, k = 100);
                u = e.width();
                v = e.height();
                $("body").append("<div class='loupe' id='" + c + "'></div>");
                var d = new Image;
                d.onload = function () {
                    x = this.width;
                    y = this.height;
                    r = Math.round(x * k / 100);
                    s = Math.round(y * k / 100);
                    var d = h / 2;
                    $("#" + c).css({
                        width: h + "px",
                        height: h + "px",
                        "background-image": "url(" + q + ")",
                        "background-size": r + "px " + s + "px"
                    });
                    a.shape == "circle" ? $("#" + c).css({
                        "-webkit-border-radius": d + "px",
                        "-moz-border-radius": d + "px",
                        "border-radius": d + "px"
                    }) : a.shape == "rounded" && $("#" + c).css({
                        "-webkit-border-radius": a.rounded_corners,
                        "-moz-border-radius": a.rounded_corners,
                        "border-radius": a.rounded_corners + "px"
                    });
                    i = $("#" + c).outerWidth();
                    a.glossy && $("#" + c).append("<div class='glossy'></div>");
                    a.apply_overlay && ($("body").append("<div class='overlay " + a.overlay_class_name + "' id='" + t + "'></div>"), $("#" + t).css({
                        top: e.offset().top + "px",
                        left: e.offset().left + "px",
                        width: e.outerWidth() + "px",
                        height: e.outerHeight() + "px"
                    }));
                    a.drop_shadow && $("#" + c).addClass("shadow")
                };
                d.src = q
            }(), (a.allow_resize || a.allow_zoom) && !z && $.event.special.mousewheel && $("#" + c).bind("mousewheel", function (a, b) {
                B(b, a);
                return !1
            }), e.bind(a.trigger, function (d) {
                p ? ($("#" + c).fadeOut(a.loupe_toggle_time, a.loupe_toggle_easing), p = !1, a.apply_overlay && $("#" + t).fadeOut(a.overlay_effect_time, a.overlay_effect_easing)) : ($("#" + c).fadeIn(a.loupe_toggle_time, a.loupe_toggle_easing), p = !0, a.apply_overlay && $("#" + t).fadeTo(a.overlay_effect_time, a.overlay_opacity, a.overlay_effect_easing), A());
                if (d.type == "click") return d.preventDefault ? d.preventDefault() : d.returnValue = !1, !1
            }), $("#" + c).bind("click", function () {
                e.trigger("click")
            }), $(document).bind("mousemove", function (d) {
                if (!p) return !0;
                var j = parseInt(e.css("border-left-width")) + parseInt(e.css("padding-left")),
                g = parseInt(e.css("border-top-width")) + parseInt(e.css("padding-top")),
                f = parseInt(e.css("border-right-width")) + parseInt(e.css("padding-right")),
                m = parseInt(e.css("border-bottom-width")) + parseInt(e.css("padding-bottom")),
                l = d.pageX - e.offset().left - j,
                k = d.pageY - e.offset().top - g,
                q = Math.round(d.pageX - i / 2),
                d = Math.round(d.pageY - i / 2);
                n = Math.round(r / u * l) * -1 + h / 2;
                o = Math.round(s / v * k) * -1 + h / 2;
                $("#" + c).css({
                    "background-position": n + "px " + o + "px"
                });
                $("#" + c).css({
                    left: q + "px",
                    top: d + "px"
                });
                if (l < -j || k < -g || l > u + f || k > v + m) $("#" + c).fadeOut(a.loupe_toggle_time), p = !1, a.apply_overlay && $("#" + t).fadeOut(a.overlay_effect_time)
            }), $(document).keyup(function (b) {
                if (b.which == a.zoom_key && p) return w = !1, b.preventDefault ? b.preventDefault() : b.returnValue = !1, !1
            }).keydown(function (b) {
                if (b.which == a.zoom_key && p) return w = !0, b.preventDefault ? b.preventDefault() : b.returnValue = !1, !1
            }))
        })
    }
})(jQuery);

window.de=window.de||{};window.com=window.com||{};de.schwankegmbh=de.schwankegmbh||{};com.hyperlord=com.hyperlord||{};com.hyperlord.Log=function(){this.history=[];this._levels={TRACE:{name:"TRACE",value:0},DEBUG:{name:"DEBUG",value:10},INFO:{name:"INFO",value:20},WARN:{name:"WARN",value:30},ERROR:{name:"ERROR",value:40}};this.level=this._levels.INFO};
com.hyperlord.Log.prototype.log=function(a,b){var c={level:a,text:b};this.history.push(c);window.console&&this.isVisible(c)&&console.log("["+c.level.name+"] "+c.text)};com.hyperlord.Log.prototype.isVisible=function(a){return a.level.value>=this.level.value};com.hyperlord.Log.prototype.trace=function(a){this.log(this._levels.TRACE,a)};com.hyperlord.Log.prototype.debug=function(a){this.log(this._levels.DEBUG,a)};com.hyperlord.Log.prototype.info=function(a){this.log(this._levels.INFO,a)};
com.hyperlord.Log.prototype.warn=function(a){this.log(this._levels.WARN,a)};com.hyperlord.Log.prototype.error=function(a){this.log(this._levels.ERROR,a)};com.hyperlord.StringUtils=function(){};com.hyperlord.StringUtils.prototype.truncate=function(a,b){return a.length>b+3?a.substr(0,b)+"...":a};com.hyperlord.Utils=function(){};com.hyperlord.Utils.prototype.shuffle=function(a){for(var a=a.slice(),b=a.length,c=b;c--;){var d=parseInt(Math.random()*b),e=a[c];a[c]=a[d];a[d]=e}return a};
de.schwankegmbh.Image=function(a){this.url=a;this._obj=this.height=this.width=null;this._loaded=this._loading=false;this._listeners=[]};de.schwankegmbh.Image.prototype.onload=function(){Logger.info("Image "+this.url+" loaded - Notifying listeners ...");for(var a in this._listeners)this._listeners[a].call(this,[])};
de.schwankegmbh.Image.prototype.preload=function(a){Logger.debug("Image.preload() called for "+this.url);if(!this._loaded&&!this._loading){this._loading=true;Logger.debug("Starting to preload "+this.url);var b=this;this._obj=new Image;this._obj.src=this.url;a&&this._listeners.push(a);jQuery(this._obj).load(function(){Logger.debug("Preload of "+b.url+" complete");b.width=b._obj.width;b.height=b._obj.height;b._loaded=true;b._loading=false;b.onload()})}else this._loading&&a?(Logger.debug("Already loading - queuing callback"),
this._listeners.push(a)):this._loaded&&a&&(Logger.debug("Already loaded - calling callback"),a.call(this,[]))};de.schwankegmbh.ImageSet=function(a){Logger.info("Creating ImageSet from "+a);this.small=a.small?new de.schwankegmbh.Image(a.small):null;this.medium=a.medium?new de.schwankegmbh.Image(a.medium):null;this.large=a.large?new de.schwankegmbh.Image(a.large):null;this.detail=a.detail?new de.schwankegmbh.Image(a.detail):null};
de.schwankegmbh.ImageSet.prototype.preload=function(a){Logger.info("Preloading image set for size "+a);(!a||a==="small")&&this.small&&this.small.preload();(!a||a==="medium")&&this.medium&&this.medium.preload();(!a||a==="large")&&this.large&&this.large.preload();(!a||a==="detail")&&this.detail&&this.detail.preload()};de.schwankegmbh.ImageControl=function(a){this._currentIndex=0;this._preload=a.preload;this.images=[];for(var b in a.images)this.images.push(new de.schwankegmbh.ImageSet(a.images[b]))};
de.schwankegmbh.ImageControl.prototype._renderImage=function(a){Logger.trace("_renderImage()");var b=this;b.display.empty();Logger.debug("Showing "+a.large.url);a.large.preload(function(){var c=parseInt(b.display.css("width")),d=this.height*(c/this.width);Logger.debug("original => w: "+this.width+", h: "+this.height);Logger.debug("actual => w: "+c+", h: "+d);b.display.animate({height:d+"px"},500,function(){var e=jQuery('<a href="'+a.detail.url+'" rel="magnify"><img src="'+a.large.url+'" width="'+
c+'" height="'+d+'" /></a>');e.hide();b.display.append(e);e.fadeIn();b._addLens()})})};de.schwankegmbh.ImageControl.prototype._removeLens=function(){};de.schwankegmbh.ImageControl.prototype._addLens=function(){jQuery('.display a[rel*="magnify"]').loupe({max_size:600,loupe_toggle_time:"fast"})};
de.schwankegmbh.ImageControl.prototype.preload=function(){if(this._preload){Logger.debug("Preloading images ...");var a=null,b=0;for(a in this.images)b<2&&(this.images[a].preload("large"),this.images[a].preload("detail")),b+=1}};
de.schwankegmbh.ImageControl.prototype.init=function(){var a=this;this.preload();this.container=jQuery(".lot-images");this.controls={btnPrevious:this.container.find("a.previous"),btnNext:this.container.find("a.next"),btnAll:this.container.find("a.all")};this.display=this.container.find(".display");this.controls.btnPrevious.click(function(){a.previous()});this.controls.btnNext.click(function(){a.next()});this.controls.btnAll.click(function(){a.all()});this.controls.btnAll.removeClass("disabled");this.refresh()};
de.schwankegmbh.ImageControl.prototype.isFirst=function(){return this._currentIndex===0};de.schwankegmbh.ImageControl.prototype.isLast=function(){return this._currentIndex===this.images.length-1};
de.schwankegmbh.ImageControl.prototype.refresh=function(){if(this.images.length>0){var a=this,b=this.images[this._currentIndex],c=a.display.find("a");c.length>0?(Logger.debug("Hiding old content"),c.unbind(),a._removeLens(),c.fadeOut("slow",function(){a._renderImage(b)})):a._renderImage(b);this.isFirst()?this.controls.btnPrevious.addClass("disabled"):this.controls.btnPrevious.removeClass("disabled");this.isLast()?this.controls.btnNext.addClass("disabled"):this.controls.btnNext.removeClass("disabled")}};
de.schwankegmbh.ImageControl.prototype.next=function(){this.isLast()||(this._currentIndex+=1,this.refresh())};de.schwankegmbh.ImageControl.prototype.previous=function(){this.isFirst()||(this._currentIndex-=1,this.refresh())};de.schwankegmbh.ImageControl.prototype.all=function(){Logger.trace("all()");this._removeLens();this.imageViewer=new de.schwankegmbh.ImageViewer(this.images);this.imageViewer.onclose(function(){self._addLens()});this.imageViewer.show()};
de.schwankegmbh.ImageViewer=function(a){var b=this;window.scrollTo(0,0);this._closeListeners=[];this.images=a;this.element=jQuery(".image-viewer");this.content=this.element.find(".image-viewer-content");this.sidebar=this.element.find(".image-viewer-sidebar");this.sidebar.empty();for(var c in this.images)a=this.images[c],a=jQuery('<div class="thumbnail" data-details="'+a.detail.url+'"><img src="'+a.medium.url+'" /><div class="overlay"></div></div>'),a.click(function(){b.sidebar.find(".thumbnail").removeClass("selected");
var a=jQuery(this);a.addClass("selected");b.showImage(a.attr("data-details"))}),this.sidebar.append(a)};de.schwankegmbh.ImageViewer.prototype.onclose=function(a){this._closeListeners.push(a)};de.schwankegmbh.ImageViewer.prototype.showImage=function(a){this.content.empty();this.content.append('<img src="'+a+'" width="'+this.content.outerWidth()+'" />')};
de.schwankegmbh.ImageViewer.prototype.show=function(){var a=this;a.element.appendTo(jQuery("body"));a.element.fadeIn("fast");a.element.find(".close").click(function(){a.close()});$(document).keyup(function(b){b.which==27&&a.close()});a.sidebar.find(".thumbnail:first").click()};de.schwankegmbh.ImageViewer.prototype.close=function(){var a=this;a.element.fadeOut("fast",function(){for(var b in this._closeListeners)this._closeListeners[b].call(a,[])})};
de.schwankegmbh.LotTicker=function(a){this._currentIndex=0;this.display=jQuery(a.container);this.lots=[];this.options=a;for(var b in a.entries)this.lots.push(a.entries[b]);this.lots=Utils.shuffle(this.lots)};de.schwankegmbh.LotTicker.prototype.refresh=function(){this._removeContent();this._showContent()};
de.schwankegmbh.LotTicker.prototype._showContent=function(){var a=this.lots[this._currentIndex],b='<a class="content" href="'+a.link+'">';a.image&&a.image!=""&&(b+='<div class="image"><img src="'+a.image+'" alt="" /></div>');b+='<div class="title"><span>'+a.title+" | "+a.category+"</span></div>";b+='<div class="info"><span>'+a.text+"</span></div>";b+="</a>";var c=jQuery(b);this.display.append(c);var d=this.display.find(".current-content");d.length>0?d.animate({top:"-=90"},1200,function(){d.remove();
c.animate({top:"0px"},600,function(){c.addClass("current-content")})}):c.animate({top:"0px"},600,function(){c.addClass("current-content")})};de.schwankegmbh.LotTicker.prototype._removeContent=function(){};de.schwankegmbh.LotTicker.prototype.init=function(){var a=this;this.intervalTimer=setInterval(function(){a.next()},this.options.delay);this.refresh()};de.schwankegmbh.LotTicker.prototype.previous=function(){this._currentIndex-=1;if(this._currentIndex<0)this._currentIndex=this.lots.length-1;this.refresh()};
de.schwankegmbh.LotTicker.prototype.next=function(){this._currentIndex+=1;if(this._currentIndex>=this.lots.length)this._currentIndex=0;this.refresh()};de.schwankegmbh.LotPicker=function(a){Logger.trace("LotPicker()");this.lots=[];this.updateHandler=null;this.infoUrl=a.infoUrl;this.auction=a.auction;this.template=a.template;this.display=jQuery(a.id);this._lotDataCache={}};
de.schwankegmbh.LotPicker.prototype._fetchLotData=function(a,b){Logger.trace("LotPicker._fetchLotData("+a+","+b+")");var c=this,d=[],e=[];jQuery.each(a,function(a,b){var b=parseInt(b),f=c._lotDataCache[b];f?(Logger.debug("Lotdata for number "+b+" fetched from cache"),d.push(f)):e.push(b)});if(e&&e.length>0){Logger.debug("Fetching missing lots from server: "+e);var g=c.infoUrl.replace(/LOT_NUMBER/g,e.join(","));Logger.debug("Info URL: "+g);jQuery.getJSON(g,null,function(a,e){Logger.debug("Received data: "+
e);jQuery.each(a.data,function(a,b){c._lotDataCache[b.number]=b;d.push(b)});b.call(c,d)}).error(function(){Logger.error("Info call failed")})}else b.call(c,d)};
de.schwankegmbh.LotPicker.prototype._renderLot=function(a){Logger.trace("LotPicker.renderLot("+a+")");var b=this,c=StringUtils.truncate(a.text,50),d=jQuery(this.template).clone().html(),d=d.replace(/\$LOT_NUMBER/g,a.number),d=d.replace(/\$PRICE/g,a.price),d=d.replace(/\$TEXT/g,c),c=jQuery(d);(b.lots.length-1)%2===0?c.addClass("even"):c.addClass("odd");jQuery(c).find(".removeLot").click(function(){b.remove(a.number)});this.display.append(c)};
de.schwankegmbh.LotPicker.prototype._updateRowStyles=function(){Logger.trace("LotPicker._updateRowStyles()");var a=this;jQuery.each(this.lots,function(b,c){Logger.debug("Updating lot "+c.number);var d=a.display.find(".lot-"+c.number);d.removeClass("odd");d.removeClass("even");d.addClass(b%2===0?"even":"odd")})};de.schwankegmbh.LotPicker.prototype._fireUpdate=function(){Logger.trace("LotPicker._fireUpdate()");this.updateHandler&&this.updateHandler.call(this,[])};
de.schwankegmbh.LotPicker.prototype.onUpdate=function(a){Logger.trace("LotPicker.onUpdate()");this.updateHandler=a};de.schwankegmbh.LotPicker.prototype.getLots=function(){Logger.trace("LotPicker.getLots()");return this.lots};de.schwankegmbh.LotPicker.prototype.getLotNumbers=function(){Logger.trace("LotPicker.getLotNumbers()");var a=[];jQuery.each(this.lots,function(b,c){a.push(c.number)});return a};
de.schwankegmbh.LotPicker.prototype.contains=function(a){Logger.trace("LotPicker.contains("+a+")");for(var b=0;b<this.lots;b++)if(this.lots[b].number==a)return true;return false};
de.schwankegmbh.LotPicker.prototype.add=function(a){Logger.trace("LotPicker.add("+a+")");if(a){var b=this;typeof a==="number"?a=[a]:typeof a==="string"&&(a=a.match(/\d+/g));a=jQuery.map(a,function(a){return parseInt(a)});Logger.debug("Filtering lot numbers "+a);if((a=jQuery.grep(a,function(a){return!b.contains(a)}))&&a.length>0)Logger.debug("Loading surviving lot numbers "+a),b._fetchLotData(a,function(a){jQuery.each(a,function(a,c){Logger.debug("Got lot: "+c.number);b.lots.push(c);b.display.append(b._renderLot(c))});
b._fireUpdate()})}};de.schwankegmbh.LotPicker.prototype.remove=function(a){Logger.trace("LotPicker.remove("+a+")");var a=parseInt(a),b=[],c=this;jQuery.each(this.lots,function(d,e){e.number!==a?b.push(e):(Logger.debug("Removing lot "+e.number),c.display.find(".lot-"+e.number).fadeOut())});this.lots=b;c._fireUpdate();this._updateRowStyles()};
de.schwankegmbh.Dialog=function(a){Logger.trace("Dialog("+a+")");var b=this;this.modalPane=jQuery('<div class="dialog-coverpane"></div>');this.element=jQuery(a);this.element.find(".buttons a.close").click(function(){b.hide()})};de.schwankegmbh.Dialog.prototype.show=function(){Logger.trace("Dialog show()");var a=this;this.modalPane.appendTo(jQuery("body"));this.modalPane.animate({opacity:0.6},500,function(){a.element.fadeIn("slow")})};
de.schwankegmbh.Dialog.prototype.hide=function(){Logger.trace("Dialog hide()");var a=this;this.element.fadeOut("fast",function(){a.modalPane.remove()})};(function(){})(this.jQuery);var Logger=new com.hyperlord.Log,Utils=new com.hyperlord.Utils,StringUtils=new com.hyperlord.StringUtils;
jQuery(document).ready(function(){jQuery(".tip").tooltip({track:true,delay:0,showURL:false});jQuery("#message-display .messages").length>0&&jQuery("#message-display").fadeIn("slow",function(){setTimeout(function(){jQuery("#message-display").fadeOut()},5E3)});jQuery("#error-display .errors").length>0&&jQuery("#error-display").fadeIn("slow");$(".toggle-language").click(function(){var a=$(this).attr("data-language"),b=location.href;b.indexOf("lang=")!==-1&&(b=b.replace(/lang=/g,"l="));b+=b.indexOf("?")===
-1?"?lang="+a:"&lang="+a;Logger.debug("Switching language to "+a);Logger.debug("New URL is "+b);location.href=b});var a=window.location.hash;a&&jQuery(a+"-lot").length>0&&(jQuery(window)._scrollable(),setTimeout(function(){var b=jQuery(a+"-lot").position().top;$(window).scrollTo(b,800,{axis:"y",easing:"easeInOutQuad"})},200));if(a&&a==="#mark"){var b=jQuery(".dialog");b&&b.length>0&&(new de.schwankegmbh.Dialog(b)).show()}$("#metanav .icon-handle").click(function(){var a=$(this);a.attr("data-state")===
"open"?(a.attr("data-state","closed"),$("#metanav .navbar").animate({right:"-266px"},"slow"),$("#metanav .navbar").removeClass("open")):(a.attr("data-state","open"),$("#metanav .navbar").animate({right:"-1px"},"slow"),$("#metanav .navbar").addClass("open"))})});
