

/**
* jQuery.timers - Timer abstractions for jQuery
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
* Date: 2009/02/08
*
* @author Blair Mitchelmore
* @version 1.1.2
*
**/

jQuery.fn.extend({
    everyTime: function(interval, label, fn, times, belay) {
        return this.each(function() {
            jQuery.timer.add(this, interval, label, fn, times, belay);
        });
    },
    oneTime: function(interval, label, fn) {
        return this.each(function() {
            jQuery.timer.add(this, interval, label, fn, 1);
        });
    },
    stopTime: function(label, fn) {
        return this.each(function() {
            jQuery.timer.remove(this, label, fn);
        });
    }
});

jQuery.event.special

jQuery.extend({
    timer: {
        global: [],
        guid: 1,
        dataKey: "jQuery.timer",
        regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,
        powers: {
            // Yeah this is major overkill...
            'ms': 1,
            'cs': 10,
            'ds': 100,
            's': 1000,
            'das': 10000,
            'hs': 100000,
            'ks': 1000000
        },
        timeParse: function(value) {
            if (value == undefined || value == null)
                return null;
            var result = this.regex.exec(jQuery.trim(value.toString()));
            if (result[2]) {
                var num = parseFloat(result[1]);
                var mult = this.powers[result[2]] || 1;
                return num * mult;
            } else {
                return value;
            }
        },
        add: function(element, interval, label, fn, times, belay) {
            var counter = 0;

            if (jQuery.isFunction(label)) {
                if (!times)
                    times = fn;
                fn = label;
                label = interval;
            }

            interval = jQuery.timer.timeParse(interval);

            if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
                return;

            if (times && times.constructor != Number) {
                belay = !!times;
                times = 0;
            }

            times = times || 0;
            belay = belay || false;

            var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {});

            if (!timers[label])
                timers[label] = {};

            fn.timerID = fn.timerID || this.guid++;

            var handler = function() {
                if (belay && this.inProgress)
                    return;
                this.inProgress = true;
                if ((++counter > times && times !== 0) || fn.call(element, counter) === false)
                    jQuery.timer.remove(element, label, fn);
                this.inProgress = false;
            };

            handler.timerID = fn.timerID;

            if (!timers[label][fn.timerID])
                timers[label][fn.timerID] = window.setInterval(handler, interval);

            this.global.push(element);

        },
        remove: function(element, label, fn) {
            var timers = jQuery.data(element, this.dataKey), ret;

            if (timers) {

                if (!label) {
                    for (label in timers)
                        this.remove(element, label, fn);
                } else if (timers[label]) {
                    if (fn) {
                        if (fn.timerID) {
                            window.clearInterval(timers[label][fn.timerID]);
                            delete timers[label][fn.timerID];
                        }
                    } else {
                        for (var fn in timers[label]) {
                            window.clearInterval(timers[label][fn]);
                            delete timers[label][fn];
                        }
                    }

                    for (ret in timers[label]) break;
                    if (!ret) {
                        ret = null;
                        delete timers[label];
                    }
                }

                for (ret in timers) break;
                if (!ret)
                    jQuery.removeData(element, this.dataKey);
            }
        }
    }
});

jQuery(window).bind("unload", function() {
    jQuery.each(jQuery.timer.global, function(index, item) {
        jQuery.timer.remove(item);
    });
});

/* =========================================================

// jquery.innerfade.js

// Datum: 2008-02-14
// Firma: Medienfreunde Hofmann & Baldes GbR
// Author: Torsten Baldes
// Mail: t.baldes@medienfreunde.com
// Web: http://medienfreunde.com

// based on the work of Matt Oakes http://portfolio.gizone.co.uk/applications/slideshow/
// and Ralf S. Engelschall http://trainofthoughts.org/

*
*  <ul id="news"> 
*      <li>content 1</li>
*      <li>content 2</li>
*      <li>content 3</li>
*  </ul>
*  
*  $('#news').innerfade({ 
*	  animationtype: Type of animation 'fade' or 'slide' (Default: 'fade'), 
*	  speed: Fading-/Sliding-Speed in milliseconds or keywords (slow, normal or fast) (Default: 'normal'), 
*	  timeout: Time between the fades in milliseconds (Default: '2000'), 
*	  type: Type of slideshow: 'sequence', 'random' or 'random_start' (Default: 'sequence'), 
* 		containerheight: Height of the containing element in any css-height-value (Default: 'auto'),
*	  runningclass: CSS-Class which the container get’s applied (Default: 'innerfade'),
*	  children: optional children selector (Default: null)
*  }); 
*

// ========================================================= */


(function($) {

    $.fn.innerfade = function(options) {
        return this.each(function() {
            $.innerfade(this, options);
        });
    };

    $.innerfade = function(container, options) {
        var settings = {
            'animationtype': 'fade',
            'speed': 'normal',
            'type': 'sequence',
            'timeout': 12000,
            'containerheight': 'auto',
            'runningclass': 'innerfade',
            'children': null
        };
        if (options)
            $.extend(settings, options);
        if (settings.children === null)
            var elements = $(container).children();
        else
            var elements = $(container).children(settings.children);
        if (elements.length > 1) {
            $(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);
            for (var i = 0; i < elements.length; i++) {
                $(elements[i]).css('z-index', String(elements.length - i)).css('position', 'absolute').hide();
            };
            if (settings.type == "sequence") {
                setTimeout(function() {
                    $.innerfade.next(elements, settings, 1, 0);
                }, settings.timeout);
                $(elements[0]).show();
            } else if (settings.type == "random") {
                var last = Math.floor(Math.random() * (elements.length));
                setTimeout(function() {
                    do {
                        current = Math.floor(Math.random() * (elements.length));
                    } while (last == current);
                    $.innerfade.next(elements, settings, current, last);
                }, settings.timeout);
                $(elements[last]).show();
            } else if (settings.type == 'random_start') {
                settings.type = 'sequence';
                var current = Math.floor(Math.random() * (elements.length));
                setTimeout(function() {
                    $.innerfade.next(elements, settings, (current + 1) % elements.length, current);
                }, settings.timeout);
                $(elements[current]).show();
            } else {
                alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
            }
        }
    };

    $.innerfade.next = function(elements, settings, current, last) {
        if (settings.animationtype == 'slide') {
            $(elements[last]).slideUp(settings.speed);
            $(elements[current]).slideDown(settings.speed);
        } else if (settings.animationtype == 'fade') {
            $(elements[last]).fadeOut(settings.speed);
            $(elements[current]).fadeIn(settings.speed, function() {
                removeFilter($(this)[0]);
            });
        } else
            alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');
        if (settings.type == "sequence") {
            if ((current + 1) < elements.length) {
                current = current + 1;
                last = current - 1;
            } else {
                current = 0;
                last = elements.length - 1;
            }
        } else if (settings.type == "random") {
            last = current;
            while (current == last)
                current = Math.floor(Math.random() * elements.length);
        } else
            alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
        setTimeout((function() {
            $.innerfade.next(elements, settings, current, last);
        }), settings.timeout);
    };

})(jQuery);

// **** remove Opacity-Filter in ie ****
function removeFilter(element) {
    if (element.style.removeAttribute) {
        element.style.removeAttribute('filter');
    }
}

/*// MSDropDown - jquery.dd.js
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?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}(';(6($){4 1E="";4 2T=6(p,q){4 r=p;4 s=1b;4 q=$.2U({1j:3F,2a:7,2V:23,1F:11,1V:3G,2W:\'1W\',1G:14,2t:\'\',1k:\'\'},q);1b.1N=2b 2X();4 t="";4 u={};u.2u=11;u.2c=14;u.2d=1n;4 v=14;4 w={2v:\'3H\',1O:\'3I\',1H:\'3J\',1I:\'3K\',1f:\'3L\',2w:\'3M\',2x:\'3N\',3O:\'3P\',2e:\'3Q\',2Y:\'3R\'};4 x={1W:q.2W,2y:\'2y\',2z:\'2z\',2A:\'2A\',1p:\'1p\',1i:.30,2B:\'2B\'};4 y={2Z:"2f,2C,2D,1P,2g,2h,1q,1w,2i,1J,3S,1X,2E",3T:"1x,1r,1i,3U"};1b.1K=2b 2X();4 z=$(r).12("1a");4 A=$(r).12("1k");q.1k+=(A==18)?"":A;4 B=$(r).31();v=($(r).12("1x")>0||$(r).12("1r")==11)?11:14;5(v){q.2a=$(r).12("1x")};4 C={};4 D=6(a){15 z+w[a]};4 E=6(a){4 b=a;4 c=$(b).12("1k");15 c};4 F=6(a){4 b=$("#"+z+" 2j:9");5(b.1c>1){1s(4 i=0;i<b.1c;i++){5(a==b[i].1g){15 11}}}1d 5(b.1c==1){5(b[0].1g==a){15 11}};15 14};4 G=6(a,b,c,d){4 e="";4 f=(d=="2F")?D("2x"):D("2w");4 g=(d=="2F")?f+"2G"+(b)+"2G"+(c):f+"2G"+(b);4 h="";4 i="";5(q.1G!=14){i=\' \'+q.1G+\' \'+a.32}1d{h=$(a).12("1Q");h=(h.1c==0)?"":\'<33 34="\'+h+\'" 35="36" /> \'};4 j=$(a).1y();4 k=$(a).3V();4 l=($(a).12("1i")==11)?"1i":"2k";C[g]={1z:h+j,1Y:k,1y:j,1g:a.1g,1a:g};4 m=E(a);5(F(a.1g)==11){e+=\'<a 3a="3b:3c(0);" 1o="9 \'+l+i+\'"\'}1d{e+=\'<a  3a="3b:3c(0);" 1o="\'+l+i+\'"\'};5(m!==14&&m!==18){e+=" 1k=\'"+m+"\'"};e+=\' 1a="\'+g+\'">\';e+=h+\'<1t 1o="\'+x.1p+\'">\'+j+\'</1t></a>\';15 e};4 H=6(){4 f=B;5(f.1c==0)15"";4 g="";4 h=D("2w");4 i=D("2x");f.2H(6(c){4 d=f[c];5(d.3W=="3X"){g+="<1u 1o=\'3Y\'>";g+="<1t 1k=\'3d-3Z:41;3d-1k:42; 43:44;\'>"+$(d).12("45")+"</1t>";4 e=$(d).31();e.2H(6(a){4 b=e[a];g+=G(b,c,a,"2F")});g+="</1u>"}1d{g+=G(d,c,"","")}});15 g};4 I=6(){4 a=D("1O");4 b=D("1f");4 c=q.1k;1R="";1R+=\'<1u 1a="\'+b+\'" 1o="\'+x.2A+\'"\';5(!v){1R+=(c!="")?\' 1k="\'+c+\'"\':\'\'}1d{1R+=(c!="")?\' 1k="46-2l:47 48 #49;1S:2I;1A:2J;\'+c+\'"\':\'\'}1R+=\'>\';15 1R};4 J=6(){4 a=D("1H");4 b=D("2e");4 c=D("1I");4 d=D("2Y");4 e="";4 f="";5(8.10(z).1B.1c>0){e=$("#"+z+" 2j:9").1y();f=$("#"+z+" 2j:9").12("1Q")};f=(f.1c==0||f==18||q.1F==14||q.1G!=14)?"":\'<33 34="\'+f+\'" 35="36" /> \';4 g=\'<1u 1a="\'+a+\'" 1o="\'+x.2y+\'"\';g+=\'>\';g+=\'<1t 1a="\'+b+\'" 1o="\'+x.2z+\'"></1t><1t 1o="\'+x.1p+\'" 1a="\'+c+\'">\'+f+\'<1t 1o="\'+x.1p+\'">\'+e+\'</1t></1t></1u>\';15 g};4 K=6(){4 c=D("1f");$("#"+c+" a.2k").1e("1P",6(a){a.1Z();N(1b);5(!v){$("#"+c).1L("1w");P(14);4 b=(q.1F==14)?$(1b).1y():$(1b).1z();T(b);s.20()};X()})};4 L=6(){4 d=14;4 e=D("1O");4 f=D("1H");4 g=D("1I");4 h=D("1f");4 i=D("2e");4 j=$("#"+z).2K();j=j+2;4 k=q.1k;5($("#"+e).1c>0){$("#"+e).2m();d=11};4 l=\'<1u 1a="\'+e+\'" 1o="\'+x.1W+\'"\';l+=(k!="")?\' 1k="\'+k+\'"\':\'\';l+=\'>\';l+=J();l+=I();l+=H();l+="</1u>";l+="</1u>";5(d==11){4 m=D("2v");$("#"+m).2L(l)}1d{$("#"+z).2L(l)};5(v){4 f=D("1H");$("#"+f).2n()};$("#"+e).19("2K",j+"21");$("#"+h).19("2K",(j-2)+"21");5(B.1c>q.2a){4 n=22($("#"+h+" a:3e").19("24-3f"))+22($("#"+h+" a:3e").19("24-2l"));4 o=((q.2V)*q.2a)-n;$("#"+h).19("1j",o+"21")}1d 5(v){4 o=$("#"+z).1j();$("#"+h).19("1j",o+"21")};5(d==14){S();O(z)};5($("#"+z).12("1i")==11){$("#"+e).19("2o",x.1i)};R();$("#"+f).1e("1w",6(a){2M(1)});$("#"+f).1e("1J",6(a){2M(0)});K();$("#"+h+" a.1i").19("2o",x.1i);5(v){$("#"+h).1e("1w",6(c){5(!u.2c){u.2c=11;$(8).1e("1X",6(a){4 b=a.3g;u.2d=b;5(b==39||b==40){a.1Z();a.2p();U();X()};5(b==37||b==38){a.1Z();a.2p();V();X()}})}})};$("#"+h).1e("1J",6(a){P(14);$(8).1L("1X");u.2c=14;u.2d=1n});$("#"+f).1e("1P",6(b){P(14);5($("#"+h+":3h").1c==1){$("#"+h).1L("1w")}1d{$("#"+h).1e("1w",6(a){P(11)});s.3i()}});$("#"+f).1e("1J",6(a){P(14)});5(q.1F&&q.1G!=14){W()}};4 M=6(a){1s(4 i 2q C){5(C[i].1g==a){15 C[i]}};15-1};4 N=6(a){4 b=D("1f");5(!v){$("#"+b+" a.9").1M("9")};4 c=$("#"+b+" a.9").12("1a");5(c!=18){4 d=(u.1T==18||u.1T==1n)?C[c].1g:u.1T};5(a&&!v){$(a).1D("9")};5(v){4 e=u.2d;5($("#"+z).12("1r")==11){5(e==17){u.1T=C[$(a).12("1a")].1g;$(a).4a("9")}1d 5(e==16){$("#"+b+" a.9").1M("9");$(a).1D("9");4 f=$(a).12("1a");4 g=C[f].1g;1s(4 i=3j.4b(d,g);i<=3j.4c(d,g);i++){$("#"+M(i).1a).1D("9")}}1d{$("#"+b+" a.9").1M("9");$(a).1D("9");u.1T=C[$(a).12("1a")].1g}}1d{$("#"+b+" a.9").1M("9");$(a).1D("9");u.1T=C[$(a).12("1a")].1g}}};4 O=6(a){4 b=a;8.10(b).4d=6(e){$("#"+b).1U(q)}};4 P=6(a){u.2u=a};4 Q=6(){15 u.2u};4 R=6(){4 b=D("1O");4 c=y.2Z.4e(",");1s(4 d=0;d<c.1c;d++){4 e=c[d];4 f=Y(e);5(f==11){3k(e){1m"2f":$("#"+b).1e("4f",6(a){8.10(z).2f()});1h;1m"1P":$("#"+b).1e("1P",6(a){$("#"+z).1C("1P")});1h;1m"2g":$("#"+b).1e("2g",6(a){$("#"+z).1C("2g")});1h;1m"2h":$("#"+b).1e("2h",6(a){$("#"+z).1C("2h")});1h;1m"1q":$("#"+b).1e("1q",6(a){$("#"+z).1C("1q")});1h;1m"1w":$("#"+b).1e("1w",6(a){$("#"+z).1C("1w")});1h;1m"2i":$("#"+b).1e("2i",6(a){$("#"+z).1C("2i")});1h;1m"1J":$("#"+b).1e("1J",6(a){$("#"+z).1C("1J")});1h}}}};4 S=6(){4 a=D("2v");$("#"+z).2L("<1u 1o=\'"+x.2B+"\' 1k=\'1j:4g;4h:4i;1A:3l;\' 1a=\'"+a+"\'></1u>");$("#"+z).4j($("#"+a))};4 T=6(a){4 b=D("1I");$("#"+b).1z(a)};4 U=6(){4 a=D("1I");4 b=D("1f");4 c=$("#"+b+" a.2k");1s(4 d=0;d<c.1c;d++){4 e=c[d];4 f=$(e).12("1a");5($(e).3m("9")&&d<c.1c-1){$("#"+b+" a.9").1M("9");$(c[d+1]).1D("9");4 g=$("#"+b+" a.9").12("1a");5(!v){4 h=(q.1F==14)?C[g].1y:C[g].1z;T(h)};5(22(($("#"+g).1A().2l+$("#"+g).1j()))>=22($("#"+b).1j())){$("#"+b).2r(($("#"+b).2r())+$("#"+g).1j()+$("#"+g).1j())};1h}}};4 V=6(){4 a=D("1I");4 b=D("1f");4 c=$("#"+b+" a.2k");1s(4 d=0;d<c.1c;d++){4 e=c[d];4 f=$(e).12("1a");5($(e).3m("9")&&d!=0){$("#"+b+" a.9").1M("9");$(c[d-1]).1D("9");4 g=$("#"+b+" a.9").12("1a");5(!v){4 h=(q.1F==14)?C[g].1y:C[g].1z;T(h)};5(22(($("#"+g).1A().2l+$("#"+g).1j()))<=0){$("#"+b).2r(($("#"+b).2r()-$("#"+b).1j())-$("#"+g).1j())};1h}}};4 W=6(){5(q.1G!=14){4 a=D("1I");4 b=8.10(z).1B[8.10(z).1l].32;5(b.1c>0){4 c=D("1f");4 d=$("#"+c+" a."+b).12("1a");4 e=$("#"+d).19("25-4k");4 f=$("#"+d).19("25-1A");4 g=$("#"+d).19("24-3n");5(e!=18){$("#"+a).26("."+x.1p).12(\'1k\',"25:"+e)};5(f!=18){$("#"+a).26("."+x.1p).19(\'25-1A\',f)};5(g!=18){$("#"+a).26("."+x.1p).19(\'24-3n\',g)};$("#"+a).26("."+x.1p).19(\'25-3o\',\'4l-3o\');$("#"+a).26("."+x.1p).19(\'24-3f\',\'4m\')}}};4 X=6(){4 a=D("1f");4 b=$("#"+a+" a.9");5(b.1c==1){4 c=$("#"+a+" a.9").1y();4 d=$("#"+a+" a.9").12("1a");5(d!=18){4 e=C[d].1Y;8.10(z).1l=C[d].1g};5(q.1F&&q.1G!=14)W()}1d 5(b.1c>1){4 f=$("#"+z+" > 2j:9").4n("9");1s(4 i=0;i<b.1c;i++){4 d=$(b[i]).12("1a");4 g=C[d].1g;8.10(z).1B[g].9="9"}};4 h=8.10(z).1l;s.1N["1l"]=h};4 Y=6(a){5($("#"+z).12("4o"+a)!=18){15 11};4 b=$("#"+z).2N("4p");5(b&&b[a]){15 11};15 14};4 Z=6(){4 b=D("1f");5(Y(\'2D\')==11){4 c=C[$("#"+b+" a.9").12("1a")].1y;5(t!=c){$("#"+z).1C("2D")}};5(Y(\'1q\')==11){$("#"+z).1C("1q")};5(Y(\'2C\')==11){$(8).1e("1q",6(a){$("#"+z).2f();$("#"+z)[0].2C();X();$(8).1L("1q")})}};4 2M=6(a){4 b=D("2e");5(a==1)$("#"+b).19({3p:\'0 4q%\'});1d $("#"+b).19({3p:\'0 0\'})};4 3q=6(){1s(4 i 2q 8.10(z)){5(4r(8.10(z)[i])!=\'6\'&&8.10(z)[i]!==18&&8.10(z)[i]!==1n){s.1v(i,8.10(z)[i],11)}}};4 3r=6(a,b){5(M(b)!=-1){8.10(z)[a]=b;4 c=D("1f");$("#"+c+" a.9").1M("9");$("#"+M(b).1a).1D("9");4 d=M(8.10(z).1l).1z;T(d)}};4 3s=6(i,a){5(a==\'d\'){1s(4 b 2q C){5(C[b].1g==i){4s C[b];1h}}};4 c=0;1s(4 b 2q C){C[b].1g=c;c++}};1b.3i=6(){5((s.28("1i",11)==11)||(s.28("1B",11).1c==0))15;4 c=D("1f");5(1E!=""&&c!=1E){$("#"+1E).3t("2O");$("#"+1E).19({1V:\'0\'})};5($("#"+c).19("1S")=="3u"){$(8).1e("1X",6(a){4 b=a.3g;5(b==39||b==40){a.1Z();a.2p();U()};5(b==37||b==38){a.1Z();a.2p();V()};5(b==27||b==13){s.20();X()};5($("#"+z).12("3v")!=18){8.10(z).3v()}});$(8).1e("2E",6(a){5($("#"+z).12("3w")!=18){8.10(z).3w()}});$(8).1e("1q",6(a){5(Q()==14){s.20()}});$("#"+c).19({1V:q.1V});$("#"+c).4t("2O",6(){5(s.1K["3x"]!=1n){2s(s.1K["3x"])(s)}});5(c!=1E){1E=c}}};1b.20=6(){4 b=D("1f");$(8).1L("1X");$(8).1L("2E");$(8).1L("1q");$("#"+b).3t("2O",6(a){Z();$("#"+b).19({1V:\'0\'});5(s.1K["3y"]!=1n){2s(s.1K["3y"])(s)}})};1b.1l=6(i){s.1v("1l",i)};1b.1v=6(a,b,c){5(a==18||b==18)3z{3A:"1v 4u 4v?"};s.1N[a]=b;5(c!=11){3k(a){1m"1l":3r(a,b);1h;1m"1i":s.1i(b,11);1h;1m"1r":8.10(z)[a]=b;v=($(r).12("1x")>0||$(r).12("1r")==11)?11:14;5(v){4 d=$("#"+z).1j();4 f=D("1f");$("#"+f).19("1j",d+"21");4 g=D("1H");$("#"+g).2n();4 f=D("1f");$("#"+f).19({1S:\'2I\',1A:\'2J\'});K()}1h;1m"1x":8.10(z)[a]=b;5(b==0){8.10(z).1r=14};v=($(r).12("1x")>0||$(r).12("1r")==11)?11:14;5(b==0){4 g=D("1H");$("#"+g).3B();4 f=D("1f");$("#"+f).19({1S:\'3u\',1A:\'3l\'});4 h="";5(8.10(z).1l>=0){4 i=M(8.10(z).1l);h=i.1z;N($("#"+i.1a))};T(h)}1d{4 g=D("1H");$("#"+g).2n();4 f=D("1f");$("#"+f).19({1S:\'2I\',1A:\'2J\'})};1h;4w:4x{8.10(z)[a]=b}4y(e){};1h}}};1b.28=6(a,b){5(a==18&&b==18){15 s.1N};5(a!=18&&b==18){15(s.1N[a]!=18)?s.1N[a]:1n};5(a!=18&&b!=18){15 8.10(z)[a]}};1b.3h=6(a){4 b=D("1O");5(a==11){$("#"+b).3B()}1d 5(a==14){$("#"+b).2n()}1d{15 $("#"+b).19("1S")}};1b.4z=6(a,b){4 c=a;4 d=c.1y;4 e=(c.1Y==18||c.1Y==1n)?d:c.1Y;4 f=(c.1Q==18||c.1Q==1n)?\'\':c.1Q;4 i=(b==18||b==1n)?8.10(z).1B.1c:b;8.10(z).1B[i]=2b 4A(d,e);5(f!=\'\')8.10(z).1B[i].1Q=f;4 g=M(i);5(g!=-1){4 h=G(8.10(z).1B[i],i,"","");$("#"+g.1a).1z(h)}1d{4 h=G(8.10(z).1B[i],i,"","");4 j=D("1f");$("#"+j).4B(h);K()}};1b.2m=6(i){8.10(z).2m(i);5((M(i))!=-1){$("#"+M(i).1a).2m();3s(i,\'d\')};5(8.10(z).1c==0){T("")}1d{4 a=M(8.10(z).1l).1z;T(a)};s.1v("1l",8.10(z).1l)};1b.1i=6(a,b){8.10(z).1i=a;4 c=D("1O");5(a==11){$("#"+c).19("2o",x.1i);s.20()}1d 5(a==14){$("#"+c).19("2o",1)};5(b!=11){s.1v("1i",a)}};1b.2P=6(){15(8.10(z).2P==18)?1n:8.10(z).2P};1b.2Q=6(){5(29.1c==1){15 8.10(z).2Q(29[0])}1d 5(29.1c==2){15 8.10(z).2Q(29[0],29[1])}1d{3z{3A:"4C 1g 4D 4E!"}}};1b.3C=6(a){15 8.10(z).3C(a)};1b.1r=6(a){5(a==18){15 s.28("1r")}1d{s.1v("1r",a)}};1b.1x=6(a){5(a==18){15 s.28("1x")}1d{s.1v("1x",a)}};1b.4F=6(a,b){s.1K[a]=b};1b.4G=6(a){2s(s.1K[a])(s)};4 3D=6(){s.1v("2R",$.1U.2R);s.1v("2S",$.1U.2S)};4 3E=6(){L();3q();3D();5(q.2t!=\'\'){2s(q.2t)(s)}};3E()};$.1U={2R:2.3,2S:"4H 4I",4J:6(a,b){15 $(a).1U(b).2N("1W")}};$.4K.2U({1U:6(b){15 1b.2H(6(){4 a=2b 2T(1b,b);$(1b).2N(\'1W\',a)})}})})(4L);',62,296,'||||var|if|function||document|selected|||||||||||||||||||||||||||||||||||||||||||||||||||||getElementById|true|attr||false|return|||undefined|css|id|this|length|else|bind|postChildID|index|break|disabled|height|style|selectedIndex|case|null|class|ddTitleText|mouseup|multiple|for|span|div|set|mouseover|size|text|html|position|options|trigger|addClass|bg|showIcon|useSprite|postTitleID|postTitleTextID|mouseout|onActions|unbind|removeClass|ddProp|postID|click|title|sDiv|display|oldIndex|msDropDown|zIndex|dd|keydown|value|preventDefault|close|px|parseInt||padding|background|find||get|arguments|visibleRows|new|keyboardAction|currentKey|postArrowID|focus|dblclick|mousedown|mousemove|option|enabled|top|remove|hide|opacity|stopPropagation|in|scrollTop|eval|onInit|insideWindow|postElementHolder|postAID|postOPTAID|ddTitle|arrow|ddChild|ddOutOfVision|blur|change|keyup|opt|_|each|block|relative|width|after|bi|data|fast|form|item|version|author|bh|extend|rowHeight|mainCSS|Object|postInputhidden|actions||children|className|img|src|align|absmiddle||||href|javascript|void|font|first|bottom|keyCode|visible|open|Math|switch|absolute|hasClass|left|repeat|backgroundPosition|bj|bk|bl|slideUp|none|onkeydown|onkeyup|onOpen|onClose|throw|message|show|namedItem|bm|bn|120|9999|_msddHolder|_msdd|_title|_titletext|_child|_msa|_msopta|postInputID|_msinput|_arrow|_inp|keypress|prop|tabindex|val|nodeName|OPTGROUP|opta|weight||bold|italic|clear|both|label|border|1px|solid|c3c3c3|toggleClass|min|max|refresh|split|mouseenter|0px|overflow|hidden|appendTo|image|no|2px|removeAttr|on|events|100|typeof|delete|slideDown|to|what|default|try|catch|add|Option|append|An|is|required|addMyEvent|fireEvent|Marghoob|Suleman|create|fn|jQuery'.split('|'),0,{}))

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*/

// 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;
	}
});

/**
 * jQuery bxSlider v3.0
 */
(function($){$.fn.bxSlider=function(options){var defaults={mode:'horizontal',infiniteLoop:true,hideControlOnEnd:false,controls:true,speed:500,easing:'swing',pager:false,pagerSelector:null,pagerType:'full',pagerLocation:'bottom',pagerShortSeparator:'/',pagerActiveClass:'pager-active',nextText:'next',nextImage:'',nextSelector:null,prevText:'prev',prevImage:'',prevSelector:null,captions:false,captionsSelector:null,auto:false,autoDirection:'next',autoControls:false,autoControlsSelector:null,autoStart:true,autoHover:false,autoDelay:0,pause:3000,startText:'start',startImage:'',stopText:'stop',stopImage:'',ticker:false,tickerSpeed:5000,tickerDirection:'next',tickerHover:false,wrapperClass:'bx-wrapper',startingSlide:0,displaySlideQty:1,moveSlideQty:1,randomStart:false,onBeforeSlide:function(){},onAfterSlide:function(){},onLastSlide:function(){},onFirstSlide:function(){},onNextSlide:function(){},onPrevSlide:function(){},buildPager:null}
var options=$.extend(defaults,options);var base=this;var $parent='';var $origElement='';var $children='';var $outerWrapper='';var $firstChild='';var childrenWidth='';var childrenOuterWidth='';var wrapperWidth='';var wrapperHeight='';var $pager='';var interval='';var $autoControls='';var $stopHtml='';var $startContent='';var $stopContent='';var autoPlaying=true;var loaded=false;var childrenMaxWidth=0;var childrenMaxHeight=0;var currentSlide=0;var origLeft=0;var origTop=0;var origShowWidth=0;var origShowHeight=0;var tickerLeft=0;var tickerTop=0;var isWorking=false;var firstSlide=0;var lastSlide=$children.length-1;this.goToSlide=function(number,stopAuto){if(!isWorking){isWorking=true;currentSlide=number;options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
if(stopAuto){if(options.auto){base.stopShow(true);}}
slide=number;if(slide==firstSlide){options.onFirstSlide(currentSlide,$children.length,$children.eq(currentSlide));}
if(slide==lastSlide){options.onLastSlide(currentSlide,$children.length,$children.eq(currentSlide));}
if(options.mode=='horizontal'){$parent.animate({'left':'-'+getSlidePosition(slide,'left')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){$parent.animate({'top':'-'+getSlidePosition(slide,'top')+'px'},options.speed,options.easing,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();}
checkEndControls();if(options.moveSlideQty>1){number=Math.floor(number/options.moveSlideQty);}
makeSlideActive(number);showCaptions();}}
this.goToNextSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
if(stopAuto){if(options.auto){base.stopShow(true);}}
if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=(currentSlide+(options.moveSlideQty));if(currentSlide<=lastSlide){checkEndControls();options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}else{currentSlide-=options.moveSlideQty;}}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide+options.moveSlideQty);if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;slideLoop=true;}
options.onNextSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'-='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'-='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();}
if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);}
showCaptions();}}}
this.goToPreviousSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
if(stopAuto){if(options.auto){base.stopShow(true);}}
if(!options.infiniteLoop){if(!isWorking){var slideLoop=false;currentSlide=currentSlide-options.moveSlideQty;if(currentSlide<0){currentSlide=0;if(options.hideControlOnEnd){$('.bx-prev',$outerWrapper).hide();}}
checkEndControls();options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));base.goToSlide(currentSlide);}}else{if(!isWorking){isWorking=true;var slideLoop=false;currentSlide=(currentSlide-(options.moveSlideQty));if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}
slideLoop=true;}
options.onPrevSlide(currentSlide,$children.length,$children.eq(currentSlide));options.onBeforeSlide(currentSlide,$children.length,$children.eq(currentSlide));if(options.mode=='horizontal'){var parentLeft=(options.moveSlideQty*childrenOuterWidth);$parent.animate({'left':'+='+parentLeft+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('left','-'+getSlidePosition(currentSlide,'left')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='vertical'){var parentTop=(options.moveSlideQty*childrenMaxHeight);$parent.animate({'top':'+='+parentTop+'px'},options.speed,options.easing,function(){isWorking=false;if(slideLoop){$parent.css('top','-'+getSlidePosition(currentSlide,'top')+'px');}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});}else if(options.mode=='fade'){setChildrenFade();}
if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);}
showCaptions();}}}
this.goToFirstSlide=function(stopAuto){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
base.goToSlide(firstSlide,stopAuto);}
this.goToLastSlide=function(){if(typeof(stopAuto)=='undefined'){var stopAuto=true;}
base.goToSlide(lastSlide,stopAuto);}
this.getCurrentSlide=function(){return currentSlide;}
this.getSlideCount=function(){return $children.length;}
this.stopShow=function(changeText){clearInterval(interval);if(typeof(changeText)=='undefined'){var changeText=true;}
if(changeText&&options.autoControls){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}}
this.startShow=function(changeText){if(typeof(changeText)=='undefined'){var changeText=true;}
setAutoInterval();if(changeText&&options.autoControls){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}
this.stopTicker=function(changeText){$parent.stop();if(typeof(changeText)=='undefined'){var changeText=true;}
if(changeText&&options.ticker){$autoControls.html($startContent).removeClass('stop').addClass('start');autoPlaying=false;}}
this.startTicker=function(changeText){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){var stoppedLeft=parseInt($parent.css('left'));var remainingDistance=(origShowWidth+stoppedLeft)+$children.eq(0).width();}else if(options.tickerDirection=='prev'){var stoppedLeft=-parseInt($parent.css('left'));var remainingDistance=(stoppedLeft)-$children.eq(0).width();}
var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowWidth;moveTheShow(tickerLeft,remainingDistance,finishingSpeed);}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){var stoppedTop=parseInt($parent.css('top'));var remainingDistance=(origShowHeight+stoppedTop)+$children.eq(0).height();}else if(options.tickerDirection=='prev'){var stoppedTop=-parseInt($parent.css('top'));var remainingDistance=(stoppedTop)-$children.eq(0).height();}
var finishingSpeed=(remainingDistance*options.tickerSpeed)/origShowHeight;moveTheShow(tickerTop,remainingDistance,finishingSpeed);if(typeof(changeText)=='undefined'){var changeText=true;}
if(changeText&&options.ticker){$autoControls.html($stopContent).removeClass('start').addClass('stop');autoPlaying=true;}}}
this.initShow=function(){$parent=$(this);$origElement=$parent.clone();$children=$parent.children();$outerWrapper='';$firstChild=$parent.children(':first');childrenWidth=$firstChild.width();childrenMaxWidth=0;childrenOuterWidth=$firstChild.outerWidth();childrenMaxHeight=0;wrapperWidth=getWrapperWidth();wrapperHeight=getWrapperHeight();isWorking=false;$pager='';currentSlide=0;origLeft=0;origTop=0;interval='';$autoControls='';$stopHtml='';$startContent='';$stopContent='';autoPlaying=true;loaded=false;origShowWidth=0;origShowHeight=0;tickerLeft=0;tickerTop=0;firstSlide=0;lastSlide=$children.length-1;$children.each(function(index){if($(this).outerHeight()>childrenMaxHeight){childrenMaxHeight=$(this).outerHeight();}
if($(this).outerWidth()>childrenMaxWidth){childrenMaxWidth=$(this).outerWidth();}});if(options.randomStart){var randomNumber=Math.floor(Math.random()*$children.length);currentSlide=randomNumber;origLeft=childrenOuterWidth*(options.moveSlideQty+randomNumber);origTop=childrenMaxHeight*(options.moveSlideQty+randomNumber);}else{currentSlide=options.startingSlide;origLeft=childrenOuterWidth*(options.moveSlideQty+options.startingSlide);origTop=childrenMaxHeight*(options.moveSlideQty+options.startingSlide);}
initCss();if(options.pager&&!options.ticker){if(options.pagerType=='full'){showPager('full');}else if(options.pagerType=='short'){showPager('short');}}
if(options.controls&&!options.ticker){setControlsVars();}
if(options.auto||options.ticker){if(options.autoControls){setAutoControlsVars();}
if(options.autoStart){setTimeout(function(){base.startShow(true);},options.autoDelay);}else{base.stopShow(true);}
if(options.autoHover){setAutoHover();}}
if(options.moveSlideQty>1){makeSlideActive(Math.ceil(currentSlide/options.moveSlideQty));}else{makeSlideActive(currentSlide);}
checkEndControls();if(options.captions){showCaptions();}
options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));}
this.destroyShow=function(){clearInterval(interval);$('.bx-next, .bx-prev, .bx-pager, .bx-auto',$outerWrapper).remove();$parent.unwrap().unwrap().removeAttr('style');$parent.children().removeAttr('style').not('.pager').remove();$children.removeClass('pager');}
this.reloadShow=function(){base.destroyShow();base.initShow();}
function initCss(){setChildrenLayout(options.startingSlide);if(options.mode=='horizontal'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+wrapperWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="position:relative; overflow:hidden; width:'+wrapperWidth+'px;"></div>').css({width:'99999px',position:'relative',left:'-'+(origLeft)+'px'});$parent.children().css({width:childrenWidth,float:'left',listStyle:'none'});$outerWrapper=base.parents('.bx-wrapper');$children.addClass('pager');}else if(options.mode=='vertical'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="width:'+childrenMaxWidth+'px; height:'+wrapperHeight+'px; position:relative; overflow:hidden;"></div>').css({height:'99999px',position:'relative',top:'-'+(origTop)+'px'});$parent.children().css({listStyle:'none',height:childrenMaxHeight});$outerWrapper=$parent.parent().parent();$children.addClass('pager');}else if(options.mode=='fade'){$parent.wrap('<div class="'+options.wrapperClass+'" style="width:'+childrenMaxWidth+'px; position:relative;"></div>').wrap('<div class="bx-window" style="height:'+childrenMaxHeight+'px; width:'+childrenMaxWidth+'px; position:relative; overflow:hidden;"></div>');$parent.children().css({listStyle:'none',position:'absolute',top:0,left:0,zIndex:98});$outerWrapper=$parent.parent().parent();$children.not(':eq('+currentSlide+')').fadeTo(0,0);$children.eq(currentSlide).css('zIndex',99);}
if(options.captions&&options.captionsSelector==null){$outerWrapper.append('<div class="bx-captions"></div>');}}
function setChildrenLayout(){if(options.mode=='horizontal'||options.mode=='vertical'){var $prependedChildren=getArraySample($children,0,options.moveSlideQty,'backward');$.each($prependedChildren,function(index){$parent.prepend($(this));});var totalNumberAfterWindow=($children.length+options.moveSlideQty)-1;var pagerExcess=$children.length-options.displaySlideQty;var numberToAppend=totalNumberAfterWindow-pagerExcess;var $appendedChildren=getArraySample($children,0,numberToAppend,'forward');if(options.infiniteLoop){$.each($appendedChildren,function(index){$parent.append($(this));});}}}
function setControlsVars(){if(options.nextImage!=''){nextContent=options.nextImage;nextType='image';}else{nextContent=options.nextText;nextType='text';}
if(options.prevImage!=''){prevContent=options.prevImage;prevType='image';}else{prevContent=options.prevText;prevType='text';}
showControls(nextType,nextContent,prevType,prevContent);}
function setAutoInterval(){if(options.auto){if(!options.infiniteLoop){if(options.autoDirection=='next'){interval=setInterval(function(){currentSlide+=options.moveSlideQty;if(currentSlide>lastSlide){currentSlide=currentSlide%$children.length;}
base.goToSlide(currentSlide,false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){currentSlide-=options.moveSlideQty;if(currentSlide<0){negativeOffset=(currentSlide%$children.length);if(negativeOffset==0){currentSlide=0;}else{currentSlide=($children.length)+negativeOffset;}}
base.goToSlide(currentSlide,false);},options.pause);}}else{if(options.autoDirection=='next'){interval=setInterval(function(){base.goToNextSlide(false);},options.pause);}else if(options.autoDirection=='prev'){interval=setInterval(function(){base.goToPreviousSlide(false);},options.pause);}}}else if(options.ticker){options.tickerSpeed*=100;$('.pager').each(function(index){origShowWidth+=$(this).width();origShowHeight+=$(this).height();});if(options.tickerDirection=='prev'&&options.mode=='horizontal'){$parent.css('left','-'+(origShowWidth+origLeft)+'px');}else if(options.tickerDirection=='prev'&&options.mode=='vertical'){$parent.css('top','-'+(origShowHeight+origTop)+'px');}
if(options.mode=='horizontal'){tickerLeft=parseInt($parent.css('left'));moveTheShow(tickerLeft,origShowWidth,options.tickerSpeed);}else if(options.mode=='vertical'){tickerTop=parseInt($parent.css('top'));moveTheShow(tickerTop,origShowHeight,options.tickerSpeed);}
if(options.tickerHover){setTickerHover();}}}
function moveTheShow(leftCss,distance,speed){if(options.mode=='horizontal'){if(options.tickerDirection=='next'){$parent.animate({'left':'-='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'left':'+='+distance+'px'},speed,'linear',function(){$parent.css('left',leftCss);moveTheShow(leftCss,origShowWidth,options.tickerSpeed);});}}else if(options.mode=='vertical'){if(options.tickerDirection=='next'){$parent.animate({'top':'-='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}else if(options.tickerDirection=='prev'){$parent.animate({'top':'+='+distance+'px'},speed,'linear',function(){$parent.css('top',leftCss);moveTheShow(leftCss,origShowHeight,options.tickerSpeed);});}}}
function setAutoControlsVars(){if(options.startImage!=''){startContent=options.startImage;startType='image';}else{startContent=options.startText;startType='text';}
if(options.stopImage!=''){stopContent=options.stopImage;stopType='image';}else{stopContent=options.stopText;stopType='text';}
showAutoControls(startType,startContent,stopType,stopContent);}
function setAutoHover(){$outerWrapper.find('.bx-window').hover(function(){if(autoPlaying){base.stopShow(false);}},function(){if(autoPlaying){base.startShow(false);}});}
function setTickerHover(){$parent.hover(function(){if(autoPlaying){base.stopTicker(false);}},function(){if(autoPlaying){base.startTicker(false);}});}
function setChildrenFade(){$children.not(':eq('+currentSlide+')').fadeTo(options.speed,0).css('zIndex',98);$children.eq(currentSlide).css('zIndex',99).fadeTo(options.speed,1,function(){isWorking=false;options.onAfterSlide(currentSlide,$children.length,$children.eq(currentSlide));});};function makeSlideActive(number){if(options.pagerType=='full'&&options.pager){$('a',$pager).removeClass(options.pagerActiveClass);$('a',$pager).eq(number).addClass(options.pagerActiveClass);}else if(options.pagerType=='short'&&options.pager){$('.bx-pager-current',$pager).html(currentSlide+1);}}
function showControls(nextType,nextContent,prevType,prevContent){var $nextHtml=$('<a href="" class="bx-next"></a>');var $prevHtml=$('<a href="" class="bx-prev"></a>');if(nextType=='text'){$nextHtml.html(nextContent);}else{$nextHtml.html('<img src="'+nextContent+'" />');}
if(prevType=='text'){$prevHtml.html(prevContent);}else{$prevHtml.html('<img src="'+prevContent+'" />');}
if(options.prevSelector){$(options.prevSelector).append($prevHtml);}else{$outerWrapper.append($prevHtml);}
if(options.nextSelector){$(options.nextSelector).append($nextHtml);}else{$outerWrapper.append($nextHtml);}
$nextHtml.click(function(){base.goToNextSlide();return false;});$prevHtml.click(function(){base.goToPreviousSlide();return false;});}
function showPager(type){var pagerQty=$children.length;if(options.moveSlideQty>1){if($children.length%options.moveSlideQty!=0){pagerQty=Math.ceil($children.length/options.moveSlideQty);}else{pagerQty=$children.length/options.moveSlideQty;}}
var pagerString='';if(options.buildPager){for(var i=0;i<pagerQty;i++){pagerString+=options.buildPager(i,$children.eq(i*options.moveSlideQty));}}else if(type=='full'){for(var i=1;i<=pagerQty;i++){pagerString+='<a href="" class="pager-link pager-'+i+'">'+i+'</a>';}}else if(type=='short'){pagerString='<span class="bx-pager-current">'+(options.startingSlide+1)+'</span> '+options.pagerShortSeparator+' <span class="bx-pager-total">'+$children.length+'<span>';}
if(options.pagerSelector){$(options.pagerSelector).append(pagerString);$pager=$(options.pagerSelector);}else{var $pagerContainer=$('<div class="bx-pager"></div>');$pagerContainer.append(pagerString);if(options.pagerLocation=='top'){$outerWrapper.prepend($pagerContainer);}else if(options.pagerLocation=='bottom'){$outerWrapper.append($pagerContainer);}
$pager=$('.bx-pager',$outerWrapper);}
$pager.children().click(function(){if(options.pagerType=='full'){var slideIndex=$pager.children().index(this);if(options.moveSlideQty>1){slideIndex*=options.moveSlideQty;}
base.goToSlide(slideIndex);}
return false;});}
function showCaptions(){var caption=$('img',$children.eq(currentSlide)).attr('title');if(caption!=''){if(options.captionsSelector){$(options.captionsSelector).html(caption);}else{$('.bx-captions',$outerWrapper).html(caption);}}else{if(options.captionsSelector){$(options.captionsSelector).html(' ');}else{$('.bx-captions',$outerWrapper).html(' ');}}}
function showAutoControls(startType,startContent,stopType,stopContent){$autoControls=$('<a href="" class="bx-start"></a>');if(startType=='text'){$startContent=startContent;}else{$startContent='<img src="'+startContent+'" />';}
if(stopType=='text'){$stopContent=stopContent;}else{$stopContent='<img src="'+stopContent+'" />';}
if(options.autoControlsSelector){$(options.autoControlsSelector).append($autoControls);}else{$outerWrapper.append('<div class="bx-auto"></div>');$('.bx-auto',$outerWrapper).html($autoControls);}
$autoControls.click(function(){if(options.ticker){if($(this).hasClass('stop')){base.stopTicker();}else if($(this).hasClass('start')){base.startTicker();}}else{if($(this).hasClass('stop')){base.stopShow(true);}else if($(this).hasClass('start')){base.startShow(true);}}
return false;});}
function checkEndControls(){if(!options.infiniteLoop&&options.hideControlOnEnd){if(currentSlide==firstSlide){$('.bx-prev',$outerWrapper).hide();}else{$('.bx-prev',$outerWrapper).show();}
if(currentSlide==lastSlide){$('.bx-next',$outerWrapper).hide();}else{$('.bx-next',$outerWrapper).show();}}}
function getSlidePosition(number,side){if(side=='left'){var position=$('.pager',$outerWrapper).eq(number).position().left;}else if(side=='top'){var position=$('.pager',$outerWrapper).eq(number).position().top;}
return position;}
function getWrapperWidth(){var wrapperWidth=$firstChild.outerWidth()*options.displaySlideQty;return wrapperWidth;}
function getWrapperHeight(){var wrapperHeight=$firstChild.outerHeight()*options.displaySlideQty;return wrapperHeight;}
function getArraySample(array,start,length,direction){var sample=[];var loopLength=length;var startPopulatingArray=false;if(direction=='backward'){array=$.makeArray(array);array.reverse();}
while(loopLength>0){$.each(array,function(index,val){if(loopLength>0){if(!startPopulatingArray){if(index==start){startPopulatingArray=true;sample.push($(this).clone());loopLength--;}}else{sample.push($(this).clone());loopLength--;}}else{return false;}});}
return sample;}
this.each(function(){base.initShow();});return this;}})(jQuery);

/*

	GalleryView - jQuery Content Gallery Plugin
	Author: 		Jack Anderson
	Version:		1.1 (April 5, 2009)
	Documentation: 	http://www.spaceforaname.com/jquery/galleryview/
	
	Please use this development script if you intend to make changes to the
	plugin code.  For production sites, please use jquery.galleryview-1.0.1-pack.js.
	
*/
(function($) {
    $.fn.galleryView = function(options) {
        var opts = $.extend($.fn.galleryView.defaults, options);

        var id;
        var iterator = 0;
        var gallery_width;
        var gallery_height;
        var frame_margin = 10;
        var strip_width;
        var wrapper_width;
        var item_count = 0;
        var slide_method;
        var img_path;
        var paused = false;
        var frame_caption_size = 20;
        var frame_margin_top = 5;
        var pointer_width = 1;

        //Define jQuery objects for reuse
        var j_gallery;
        var j_filmstrip;
        var j_frames;
        var j_panels;
        var j_pointer;

        /************************************************/
        /*	Plugin Methods								*/
        /************************************************/
        function showItem(i) {
            //Disable next/prev buttons until transition is complete
            $('img.nav-next').unbind('click');
            $('img.nav-prev').unbind('click');
            j_frames.unbind('click');
            if (has_panels) {
                if (opts.fade_panels) {
                    //Fade out all panels and fade in target panel
                    j_panels.fadeOut(opts.transition_speed).eq(i % item_count).fadeIn(opts.transition_speed, function() {
                        if (!has_filmstrip) {
                            $('img.nav-prev').click(showPrevItem);
                            $('img.nav-next').click(showNextItem);
                        }
                    });
                }
            }

            if (has_filmstrip) {
                //Slide either pointer or filmstrip, depending on transition method
                if (slide_method == 'strip') {
                    //Stop filmstrip if it's currently in motion
                    j_filmstrip.stop();

                    //Determine distance between pointer (eventual destination) and target frame
                    var distance = getPos(j_frames[i]).left - (getPos(j_pointer[0]).left + 2);
                    var leftstr = (distance >= 0 ? '-=' : '+=') + Math.abs(distance) + 'px';

                    //Animate filmstrip and slide target frame under pointer
                    //If target frame is a duplicate, jump back to 'original' frame
                    j_filmstrip.animate({
                        'left': leftstr
                    }, opts.transition_speed, opts.easing, function() {
                        //Always ensure that there are a sufficient number of hidden frames on either
                        //side of the filmstrip to avoid empty frames
                        if (i > item_count) {
                            i = i % item_count;
                            iterator = i;
                            j_filmstrip.css('left', '-' + ((opts.frame_width + frame_margin) * i) + 'px');
                            // alert('1left:' + ((opts.frame_width + frame_margin) * i));
                        } else if (i <= (item_count - strip_size)) {
                            i = (i % item_count) + item_count;
                            iterator = i;
                            j_filmstrip.css('left', '-' + ((opts.frame_width + frame_margin) * i) + 'px');
                            //alert('2left:'+((opts.frame_width + frame_margin) * i));
                        }

                        if (!opts.fade_panels) {
                            j_panels.hide().eq(i % item_count).show();
                        }
                        $('img.nav-prev').click(showPrevItem);
                        $('img.nav-next').click(showNextItem);
                        enableFrameClicking();
                    });
                } else if (slide_method == 'pointer') {
                    //Stop pointer if it's currently in motion
                    j_pointer.stop();
                    //Get position of target frame
                    var pos = getPos(j_frames[i]);
                    //Slide the pointer over the target frame
                    j_pointer.animate({
                        'left': (pos.left - 2 + 'px')
                    }, opts.transition_speed, opts.easing, function() {
                        if (!opts.fade_panels) {
                            j_panels.hide().eq(i % item_count).show();
                        }
                        $('img.nav-prev').click(showPrevItem);
                        $('img.nav-next').click(showNextItem);
                        enableFrameClicking();
                    });
                }

                if ($('a', j_frames[i])[0]) {
                    j_pointer.unbind('click').click(function() {
                        var a = $('a', j_frames[i]).eq(0);
                        if (a.attr('target') == '_blank') { window.open(a.attr('href')); }
                        else { location.href = a.attr('href'); }
                    });
                }
            }
        };
        function showNextItem() {
            $(document).stopTime("transition");
            if (++iterator == j_frames.length) { iterator = 0; }
            showItem(iterator);
            $(document).everyTime(opts.transition_interval, "transition", function() {
                showNextItem();
            });
        };
        function showPrevItem() {
            $(document).stopTime("transition");
            if (--iterator < 0) { iterator = item_count - 1; }
            //alert(iterator);
            showItem(iterator);
            $(document).everyTime(opts.transition_interval, "transition", function() {
                showNextItem();
            });
        };
        function getPos(el) {
            var left = 0, top = 0;
            var el_id = el.id;
            if (el.offsetParent) {
                do {
                    left += el.offsetLeft;
                    top += el.offsetTop;
                } while (el = el.offsetParent);
            }
            //If we want the position of the gallery itself, return it
            if (el_id == id) { return { 'left': left, 'top': top }; }
            //Otherwise, get position of element relative to gallery
            else {
                var gPos = getPos(j_gallery[0]);
                var gLeft = gPos.left;
                var gTop = gPos.top;

                return { 'left': left - gLeft, 'top': top - gTop };
            }
        };
        function enableFrameClicking() {
            j_frames.each(function(i) {
                //If there isn't a link in this frame, set up frame to slide on click
                //Frames with links will handle themselves
                if ($('a', this).length == 0) {
                    $(this).click(function() {
                        $(document).stopTime("transition");
                        showItem(i);
                        iterator = i;
                        $(document).everyTime(opts.transition_interval, "transition", function() {
                            showNextItem();
                        });
                    });
                }
            });
        };

        function buildPanels() {
            //If there are panel captions, add overlay divs
            if ($('.panel-overlay').length > 0) { j_panels.append('<div class="overlay" style="width:auto;"></div>'); }

            if (!has_filmstrip) {
                //Add navigation buttons
                $('<img />').addClass('nav-next').attr('src', '/images/layout/gallery_right.gif').appendTo(j_gallery).css({
                    'position': 'absolute',
                    'zIndex': '1100',
                    'cursor': 'pointer',
                    'top': ((opts.panel_height - 22) / 2) + 'px',
                    'right': '10px',
                    'display': 'none'
                }).click(showNextItem);
                $('<img />').addClass('nav-prev').attr('src', '/images/layout/gallery_left.gif').appendTo(j_gallery).css({
                    'position': 'absolute',
                    'zIndex': '1100',
                    'cursor': 'pointer',
                    'top': ((opts.panel_height - 22) / 2) + 'px',
                    'left': '10px',
                    'display': 'none'
                }).click(showPrevItem);


            }
            j_panels.css({
                'width': 'auto',
                'height': (opts.panel_height - parseInt(j_panels.css('paddingTop').split('px')[0], 10) - parseInt(j_panels.css('paddingBottom').split('px')[0], 10)) + 'px',
                'position': 'absolute',
                'top': (opts.filmstrip_position == 'top' ? (opts.frame_height + frame_margin_top + (opts.show_captions ? frame_caption_size : frame_margin_top)) + 'px' : '0px'),
                'left': '0px',
                'overflow': 'hidden',
                'background': '',
                'display': 'none'
            });
            $('.panel-overlay', j_panels).css({
                'position': 'absolute',
                'zIndex': '999',
                'width': 'auto',
                'height': opts.overlay_height + 'px',
                'top': (opts.overlay_position == 'top' ? '0' : opts.panel_height - opts.overlay_height + 'px'),
                'left': '0',
                'padding': '0px',
                'color': opts.overlay_text_color,
                'fontSize': opts.overlay_font_size
            });
            $('.panel-overlay a', j_panels).css({
                'color': opts.overlay_text_color,
                'textDecoration': 'underline',
                'fontWeight': 'bold'
            });
            $('.overlay', j_panels).css({
                'position': 'absolute',
                'zIndex': '998',
                'width': 'auto',
                'height': opts.overlay_height + 'px',
                'top': (opts.overlay_position == 'top' ? '0' : opts.panel_height - opts.overlay_height + 'px'),
                'left': '0',

                'opacity': opts.overlay_opacity
            });
            $('.panel iframe', j_panels).css({
                'width': 'auto',
                'height': (opts.panel_height - opts.overlay_height) + 'px',
                'border': '0'
            });
        };

        function buildFilmstrip() {
            //Add wrapper to filmstrip to hide extra frames
            j_filmstrip.wrap('<div class="strip_wrapper" ></div>');
            if (slide_method == 'strip') {
                j_frames.clone().appendTo(j_filmstrip);
                j_frames.clone().appendTo(j_filmstrip);
                j_frames = $('li', j_filmstrip);
            }
            //If captions are enabled, add caption divs and fill with the image titles
            if (opts.show_captions) {
                j_frames.append('<div class="caption"></div>').each(function(i) {
                    $(this).find('.caption').html($(this).find('img').attr('title'));
                });
            }

            j_filmstrip.css({
                'listStyle': 'none',
                'margin': '0',
                'padding': '0',
                'width': strip_width + 'px',
                'position': 'absolute',
                'zIndex': '900',
                'top': '0',
                'left': '0',
                'height': (opts.frame_height + 10) + 'px'
            });
            j_frames.css({
                'float': 'left',
                'position': 'relative',
                'height': opts.frame_height + 'px',
                'zIndex': '901',
                'marginTop': frame_margin_top + 'px',
                'marginBottom': '0px',
                'marginRight': frame_margin + 'px',
                'padding': '0',
                'cursor': 'pointer'
            });
            $('img', j_frames).css({
                'border': 'none'
            });
            $('.strip_wrapper', j_gallery).css({
                'position': 'absolute',
                'top': (opts.filmstrip_position == 'top' ? '0px' : opts.panel_height + 'px'),
                'margin-top': '-60px',
                'left': ((gallery_width - wrapper_width) / 2) + 'px',
                //'width': (item_count * (frame_margin + (opts.frame_width - pointer_width) )) + 'px',
                'width': '245px',
                'height': (opts.frame_height + frame_margin_top + (opts.show_captions ? frame_caption_size : frame_margin_top)) + 'px',
                'overflow': 'hidden',
                'margin-left': '200px'
            });

            $('.caption', j_gallery).css({
                'position': 'absolute',
                'top': opts.frame_height + 'px',
                'left': '0',
                'margin': '0',
                'width': opts.frame_width + 'px',
                'padding': '0',
                'color': opts.caption_text_color,
                'textAlign': 'center',
                'fontSize': '10px',
                'height': frame_caption_size + 'px',

                'lineHeight': frame_caption_size + 'px'
            });
            var pointer = $('<div></div>');
            pointer.attr('id', 'pointer').appendTo(j_gallery).css({
                'position': 'absolute',
                'zIndex': '1000',
                'cursor': 'pointer',
                'top': getPos(j_frames[0]).top - (pointer_width / 2) + 'px',
                'left': getPos(j_frames[0]).left - (pointer_width / 2) + 'px',
                'height': opts.frame_height - pointer_width + 'px',
                'width': opts.frame_width - pointer_width + 'px',
                'border': (has_panels ? pointer_width + 'px solid ' + (opts.nav_theme == 'dark' ? 'black' : 'white') : 'none')
            });
            j_pointer = $('#pointer', j_gallery);
            if (has_panels) {
                var pointerArrow = $('<img />');

            }

            //If the filmstrip is animating, move the strip to the middle third
            if (slide_method == 'strip') {
                j_filmstrip.css('left', '-' + ((opts.frame_width + frame_margin) * item_count) + 'px');
                iterator = item_count;
            }
            //If there's a link under the pointer, enable clicking on the pointer
            if ($('a', j_frames[iterator])[0]) {
                j_pointer.click(function() {
                    var a = $('a', j_frames[iterator]).eq(0);
                    if (a.attr('target') == '_blank') { window.open(a.attr('href')); }
                    else { location.href = a.attr('href'); }
                });
            }

            //Add navigation buttons
            $('<img />').addClass('nav-next').attr('src', '/images/layout/next.png').appendTo(j_gallery).css({
                'position': 'absolute',
                'cursor': 'pointer',
                'top': (opts.filmstrip_position == 'top' ? 0 : opts.panel_height) + frame_margin_top + ((opts.frame_height - 22) / 2) + 'px',
                'margin-top': '-63px',
                'margin-right': '213px',

                'right': (gallery_width / 2) - (wrapper_width / 2) - 10 - 22 + 'px'
            }).click(showNextItem);
            $('<img />').addClass('nav-prev').attr('src', '/images/layout/previous.png').appendTo(j_gallery).css({
                'position': 'absolute',
                'cursor': 'pointer',
                'margin-top': '-63px',
                'margin-left': '190px',

                'top': (opts.filmstrip_position == 'top' ? 0 : opts.panel_height) + frame_margin_top + ((opts.frame_height - 22) / 2) + 'px',
                'left': (gallery_width / 2) - (wrapper_width / 2) - 10 - 22 + 'px'
            }).click(showPrevItem);

        };

        //Check mouse to see if it is within the borders of the panel
        //More reliable than 'mouseover' event when elements overlay the panel
        function mouseIsOverPanels(x, y) {
            var pos = getPos(j_gallery[0]);
            var top = pos.top;
            var left = pos.left;
            return x > left && x < left + opts.panel_width && y > top && y < top + opts.panel_height;
        };

        /************************************************/
        /*	Main Plugin Code							*/
        /************************************************/
        return this.each(function() {
            j_gallery = $(this);
            //Determine path between current page and filmstrip images
            //Scan script tags and look for path to GalleryView plugin
            $('script').each(function(i) {
                var s = $(this);
                if (s.attr('src') && s.attr('src').match(/jquery\.galleryview/)) {
                    img_path = s.attr('src').split('jquery.galleryview')[0] + 'themes/';
                }
            });

            //Hide gallery to prevent Flash of Unstyled Content (FoUC) in IE
            j_gallery.css('visibility', 'hidden');

            //Assign elements to variables for reuse
            j_filmstrip = $('.filmstrip', j_gallery);
            j_frames = $('li', j_filmstrip);
            j_panels = $('.panel', j_gallery);

            id = j_gallery.attr('id');

            has_panels = j_panels.length > 0;
            has_filmstrip = j_frames.length > 0;

            if (!has_panels) opts.panel_height = 0;

            //Number of frames in filmstrip
            item_count = has_panels ? j_panels.length : j_frames.length;

            //Number of frames that can display within the screen's width
            //64 = width of block for navigation button * 2
            //5 = minimum frame margin
            strip_size = has_panels ? Math.floor((opts.panel_width - 64) / (opts.frame_width + frame_margin)) : Math.min(item_count, opts.filmstrip_size);
            strip_size = 3;

            /************************************************/
            /*	Determine transition method for filmstrip	*/
            /************************************************/
            //If more items than strip size, slide filmstrip
            //Otherwise, slide pointer
            if (strip_size >= item_count) {
                slide_method = 'pointer';
                strip_size = item_count;
            }
            else { slide_method = 'strip'; }

            /************************************************/
            /*	Determine dimensions of various elements	*/
            /************************************************/

            //Width of gallery block
            gallery_width = has_panels ? opts.panel_width : (strip_size * (opts.frame_width + frame_margin)) - frame_margin + 64;

            //Height of gallery block = screen + filmstrip + captions (optional)
            gallery_height = (has_panels ? opts.panel_height : 0) + (has_filmstrip ? opts.frame_height + frame_margin_top + (opts.show_captions ? frame_caption_size : frame_margin_top) : 0);

            //Width of filmstrip
            if (slide_method == 'pointer') { strip_width = (opts.frame_width * item_count) + (frame_margin * (item_count)); }
            else { strip_width = (opts.frame_width * item_count * 3) + (frame_margin * (item_count * 3)); }

            //Width of filmstrip wrapper (to hide overflow)
            wrapper_width = 662; //((strip_size * opts.frame_width) + ((strip_size - 1) * frame_margin));

            /************************************************/
            /*	Apply CSS Styles							*/
            /************************************************/
            j_gallery.css({
                'position': 'relative',
                'margin': '0',

                'border': opts.border,
                'width': gallery_width + 'px',
                'height': gallery_height + 'px'
            });

            /************************************************/
            /*	Build filmstrip and/or panels				*/
            /************************************************/
            if (has_filmstrip) {
                buildFilmstrip();
            }
            if (has_panels) {
                buildPanels();
            }


            /************************************************/
            /*	Add events to various elements				*/
            /************************************************/
            if (has_filmstrip) enableFrameClicking();



            $().mousemove(function(e) {
                if (mouseIsOverPanels(e.pageX, e.pageY)) {
                    if (opts.pause_on_hover) {
                        $(document).oneTime(500, "animation_pause", function() {
                            $(document).stopTime("transition");
                            paused = true;
                        });
                    }
                    if (has_panels && !has_filmstrip) {
                        $('.nav-overlay').fadeIn('fast');
                        $('.nav-next').fadeIn('fast');
                        $('.nav-prev').fadeIn('fast');
                    }
                } else {
                    if (opts.pause_on_hover) {
                        $(document).stopTime("animation_pause");
                        if (paused) {
                            $(document).everyTime(opts.transition_interval, "transition", function() {
                                showNextItem();
                            });
                            paused = false;
                        }
                    }
                    if (has_panels && !has_filmstrip) {
                        $('.nav-overlay').fadeOut('fast');
                        $('.nav-next').fadeOut('fast');
                        $('.nav-prev').fadeOut('fast');
                    }
                }
            });


            /************************************************/
            /*	Initiate Automated Animation				*/
            /************************************************/
            //Show the first panel
            j_panels.eq(0).show();

            //If we have more than one item, begin automated transitions
            if (item_count > 1) {
                $(document).everyTime(opts.transition_interval, "transition", function() {
                    showNextItem();
                });
            }

            //Make gallery visible now that work is complete
            j_gallery.css('visibility', 'visible');
        });
    };

    $.fn.galleryView.defaults = {
        panel_width: 300,
        panel_height: 300,
        frame_width: 80,
        frame_height: 80,
        filmstrip_size: 5,
        overlay_height: 40,
        overlay_font_size: '1em',
        transition_speed: 400,
        transition_interval: 6000,
        overlay_opacity: 0.6,
        overlay_color: 'black',
        background_color: 'black',
        overlay_text_color: 'white',
        caption_text_color: 'white',
        nav_theme: 'light',
        easing: 'swing',
        filmstrip_position: 'bottom',
        overlay_position: 'bottom',
        show_captions: false,
        fade_panels: true,
        pause_on_hover: false
    };
})(jQuery);

/**
 * jQuery.timers - Timer abstractions for jQuery
 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
 * Date: 2009/02/08
 *
 * @author Blair Mitchelmore
 * @version 1.1.2
 *
 **/

jQuery.fn.extend({
	everyTime: function(interval, label, fn, times, belay) {
		return this.each(function() {
			jQuery.timer.add(this, interval, label, fn, times, belay);
		});
	},
	oneTime: function(interval, label, fn) {
		return this.each(function() {
			jQuery.timer.add(this, interval, label, fn, 1);
		});
	},
	stopTime: function(label, fn) {
		return this.each(function() {
			jQuery.timer.remove(this, label, fn);
		});
	}
});

jQuery.event.special

jQuery.extend({
	timer: {
		global: [],
		guid: 1,
		dataKey: "jQuery.timer",
		regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/,
		powers: {
			// Yeah this is major overkill...
			'ms': 1,
			'cs': 10,
			'ds': 100,
			's': 1000,
			'das': 10000,
			'hs': 100000,
			'ks': 1000000
		},
		timeParse: function(value) {
			if (value == undefined || value == null)
				return null;
			var result = this.regex.exec(jQuery.trim(value.toString()));
			if (result[2]) {
				var num = parseFloat(result[1]);
				var mult = this.powers[result[2]] || 1;
				return num * mult;
			} else {
				return value;
			}
		},
		add: function(element, interval, label, fn, times, belay) {
			var counter = 0;
			
			if (jQuery.isFunction(label)) {
				if (!times) 
					times = fn;
				fn = label;
				label = interval;
			}
			
			interval = jQuery.timer.timeParse(interval);

			if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
				return;

			if (times && times.constructor != Number) {
				belay = !!times;
				times = 0;
			}
			
			times = times || 0;
			belay = belay || false;
			
			var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {});
			
			if (!timers[label])
				timers[label] = {};
			
			fn.timerID = fn.timerID || this.guid++;
			
			var handler = function() {
				if (belay && this.inProgress) 
					return;
				this.inProgress = true;
				if ((++counter > times && times !== 0) || fn.call(element, counter) === false)
					jQuery.timer.remove(element, label, fn);
				this.inProgress = false;
			};
			
			handler.timerID = fn.timerID;
			
			if (!timers[label][fn.timerID])
				timers[label][fn.timerID] = window.setInterval(handler,interval);
			
			this.global.push( element );
			
		},
		remove: function(element, label, fn) {
			var timers = jQuery.data(element, this.dataKey), ret;
			
			if ( timers ) {
				
				if (!label) {
					for ( label in timers )
						this.remove(element, label, fn);
				} else if ( timers[label] ) {
					if ( fn ) {
						if ( fn.timerID ) {
							window.clearInterval(timers[label][fn.timerID]);
							delete timers[label][fn.timerID];
						}
					} else {
						for ( var fn in timers[label] ) {
							window.clearInterval(timers[label][fn]);
							delete timers[label][fn];
						}
					}
					
					for ( ret in timers[label] ) break;
					if ( !ret ) {
						ret = null;
						delete timers[label];
					}
				}
				
				for ( ret in timers ) break;
				if ( !ret ) 
					jQuery.removeData(element, this.dataKey);
			}
		}
	}
});

jQuery(window).bind("unload", function() {
	jQuery.each(jQuery.timer.global, function(index, item) {
		jQuery.timer.remove(item);
	});
});

/* =========================================================

// jquery.innerfade.js

// Datum: 2008-02-14
// Firma: Medienfreunde Hofmann & Baldes GbR
// Author: Torsten Baldes
// Mail: t.baldes@medienfreunde.com
// Web: http://medienfreunde.com

// based on the work of Matt Oakes http://portfolio.gizone.co.uk/applications/slideshow/
// and Ralf S. Engelschall http://trainofthoughts.org/

*
*  <ul id="news"> 
*      <li>content 1</li>
*      <li>content 2</li>
*      <li>content 3</li>
*  </ul>
*  
*  $('#news').innerfade({ 
*	  animationtype: Type of animation 'fade' or 'slide' (Default: 'fade'), 
*	  speed: Fading-/Sliding-Speed in milliseconds or keywords (slow, normal or fast) (Default: 'normal'), 
*	  timeout: Time between the fades in milliseconds (Default: '2000'), 
*	  type: Type of slideshow: 'sequence', 'random' or 'random_start' (Default: 'sequence'), 
* 		containerheight: Height of the containing element in any css-height-value (Default: 'auto'),
*	  runningclass: CSS-Class which the container get’s applied (Default: 'innerfade'),
*	  children: optional children selector (Default: null)
*  }); 
*

// ========================================================= */


(function($) {

    $.fn.innerfade = function(options) {
        return this.each(function() {
            $.innerfade(this, options);
        });
    };

    $.innerfade = function(container, options) {
        var settings = {
            'animationtype': 'fade',
            'speed': 'normal',
            'type': 'sequence',
            'timeout': 12000,
            'containerheight': 'auto',
            'runningclass': 'innerfade',
            'children': null
        };
        if (options)
            $.extend(settings, options);
        if (settings.children === null)
            var elements = $(container).children();
        else
            var elements = $(container).children(settings.children);
        if (elements.length > 1) {
            $(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass);
            for (var i = 0; i < elements.length; i++) {
                $(elements[i]).css('z-index', String(elements.length - i)).css('position', 'absolute').hide();
            };
            if (settings.type == "sequence") {
                setTimeout(function() {
                    $.innerfade.next(elements, settings, 1, 0);
                }, settings.timeout);
                $(elements[0]).show();
            } else if (settings.type == "random") {
                var last = Math.floor(Math.random() * (elements.length));
                setTimeout(function() {
                    do {
                        current = Math.floor(Math.random() * (elements.length));
                    } while (last == current);
                    $.innerfade.next(elements, settings, current, last);
                }, settings.timeout);
                $(elements[last]).show();
            } else if (settings.type == 'random_start') {
                settings.type = 'sequence';
                var current = Math.floor(Math.random() * (elements.length));
                setTimeout(function() {
                    $.innerfade.next(elements, settings, (current + 1) % elements.length, current);
                }, settings.timeout);
                $(elements[current]).show();
            } else {
                alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
            }
        }
    };

    $.innerfade.next = function(elements, settings, current, last) {
        if (settings.animationtype == 'slide') {
            $(elements[last]).slideUp(settings.speed);
            $(elements[current]).slideDown(settings.speed);
        } else if (settings.animationtype == 'fade') {
            $(elements[last]).fadeOut(settings.speed);
            $(elements[current]).fadeIn(settings.speed, function() {
                removeFilter($(this)[0]);
            });
        } else
            alert('Innerfade-animationtype must either be \'slide\' or \'fade\'');
        if (settings.type == "sequence") {
            if ((current + 1) < elements.length) {
                current = current + 1;
                last = current - 1;
            } else {
                current = 0;
                last = elements.length - 1;
            }
        } else if (settings.type == "random") {
            last = current;
            while (current == last)
                current = Math.floor(Math.random() * elements.length);
        } else
            alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'');
        setTimeout((function() {
            $.innerfade.next(elements, settings, current, last);
        }), settings.timeout);
    };

})(jQuery);

// **** remove Opacity-Filter in ie ****
function removeFilter(element) {
    if (element.style.removeAttribute) {
        element.style.removeAttribute('filter');
    }
}

/*jSCROLLPANE*/
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
* 
* Requires: 1.2.2+
*/

(function($) {

    var types = ['DOMMouseScroll', 'mousewheel'];

    $.event.special.mousewheel = {
        setup: function() {
            if (this.addEventListener) {
                for (var i = types.length; i; ) {
                    this.addEventListener(types[--i], handler, false);
                }
            } else {
                this.onmousewheel = handler;
            }
        },

        teardown: function() {
            if (this.removeEventListener) {
                for (var i = types.length; i; ) {
                    this.removeEventListener(types[--i], handler, false);
                }
            } else {
                this.onmousewheel = null;
            }
        }
    };

    $.fn.extend({
        mousewheel: function(fn) {
            return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
        },

        unmousewheel: function(fn) {
            return this.unbind("mousewheel", fn);
        }
    });


    function handler(event) {
        var orgEvent = event || window.event, args = [].slice.call(arguments, 1), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
        event = $.event.fix(orgEvent);
        event.type = "mousewheel";

        // Old school scrollwheel delta
        if (event.wheelDelta) { delta = event.wheelDelta / 120; }
        if (event.detail) { delta = -event.detail / 3; }

        // New school multidimensional scroll (touchpads) deltas
        deltaY = delta;

        // Gecko
        if (orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS) {
            deltaY = 0;
            deltaX = -1 * delta;
        }

        // Webkit
        if (orgEvent.wheelDeltaY !== undefined) { deltaY = orgEvent.wheelDeltaY / 120; }
        if (orgEvent.wheelDeltaX !== undefined) { deltaX = -1 * orgEvent.wheelDeltaX / 120; }

        // Add event and delta to the front of the arguments
        args.unshift(event, delta, deltaX, deltaY);

        return $.event.handle.apply(this, args);
    }

})(jQuery);

/*
* jScrollPane - v2.0.0beta9 - 2011-01-31
* http://jscrollpane.kelvinluck.com/
*
* Copyright (c) 2010 Kelvin Luck
* Dual licensed under the MIT and GPL licenses.
*/
(function(b, a, c) {
    b.fn.jScrollPane = function(f) {
        function d(D, N) {
            var ay, P = this, X, aj, w, al, S, Y, z, r, az, aE, au, j, I, i, k, Z, T, ap, W, u, B, aq, ae, am, G, m, at, ax, y, av, aI, g, K, ai = true, O = true, aH = false, l = false, ao = D.clone().empty(), ab = b.fn.mwheelIntent ? "mwheelIntent.jsp" : "mousewheel.jsp"; aI = D.css("paddingTop") + " " + D.css("paddingRight") + " " + D.css("paddingBottom") + " " + D.css("paddingLeft"); g = (parseInt(D.css("paddingLeft"), 10) || 0) + (parseInt(D.css("paddingRight"), 10) || 0); function ar(aR) { var aP, aQ, aL, aN, aM, aK, aJ, aO; ay = aR; if (X === c) { aJ = D.scrollTop(); aO = D.scrollLeft(); D.css({ overflow: "hidden", padding: 0 }); aj = D.innerWidth() + g; w = D.innerHeight(); D.width(aj); X = b('<div class="jspPane" />').css("padding", aI).append(D.children()); al = b('<div class="jspContainer" />').css({ width: aj + "px", height: w + "px" }).append(X).appendTo(D) } else { D.css("width", ""); aK = D.innerWidth() + g != aj || D.outerHeight() != w; if (aK) { aj = D.innerWidth() + g; w = D.innerHeight(); al.css({ width: aj + "px", height: w + "px" }) } if (!aK && K == S && X.outerHeight() == Y) { D.width(aj); return } K = S; X.css("width", ""); D.width(aj); al.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end() } aP = X.clone().css("position", "absolute"); aQ = b('<div style="width:1px; position: relative;" />').append(aP); b("body").append(aQ); S = Math.max(X.outerWidth(), aP.outerWidth()); aQ.remove(); Y = X.outerHeight(); z = S / aj; r = Y / w; az = r > 1; aE = z > 1; if (!(aE || az)) { D.removeClass("jspScrollable"); X.css({ top: 0, width: al.width() - g }); o(); E(); Q(); x(); ah() } else { D.addClass("jspScrollable"); aL = ay.maintainPosition && (I || Z); if (aL) { aN = aC(); aM = aA() } aF(); A(); F(); if (aL) { M(aN, false); L(aM, false) } J(); af(); an(); if (ay.enableKeyboardNavigation) { R() } if (ay.clickOnTrack) { q() } C(); if (ay.hijackInternalLinks) { n() } } if (ay.autoReinitialise && !av) { av = setInterval(function() { ar(ay) }, ay.autoReinitialiseDelay) } else { if (!ay.autoReinitialise && av) { clearInterval(av) } } aJ && D.scrollTop(0) && L(aJ, false); aO && D.scrollLeft(0) && M(aO, false); D.trigger("jsp-initialised", [aE || az]) } function aF() { if (az) { al.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'), b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'), b('<div class="jspDragBottom" />'))), b('<div class="jspCap jspCapBottom" />'))); T = al.find(">.jspVerticalBar"); ap = T.find(">.jspTrack"); au = ap.find(">.jspDrag"); if (ay.showArrows) { aq = b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp", aD(0, -1)).bind("click.jsp", aB); ae = b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp", aD(0, 1)).bind("click.jsp", aB); if (ay.arrowScrollOnHover) { aq.bind("mouseover.jsp", aD(0, -1, aq)); ae.bind("mouseover.jsp", aD(0, 1, ae)) } ak(ap, ay.verticalArrowPositions, aq, ae) } u = w; al.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function() { u -= b(this).outerHeight() }); au.hover(function() { au.addClass("jspHover") }, function() { au.removeClass("jspHover") }).bind("mousedown.jsp", function(aJ) { b("html").bind("dragstart.jsp selectstart.jsp", aB); au.addClass("jspActive"); var s = aJ.pageY - au.position().top; b("html").bind("mousemove.jsp", function(aK) { U(aK.pageY - s, false) }).bind("mouseup.jsp mouseleave.jsp", aw); return false }); p() } } function p() { ap.height(u + "px"); I = 0; W = ay.verticalGutter + ap.outerWidth(); X.width(aj - W - g); if (T.position().left === 0) { X.css("margin-left", W + "px") } } function A() {
                if (aE) {
                    al.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'), b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'), b('<div class="jspDragRight" />'))), b('<div class="jspCap jspCapRight" />'))); am = al.find(">.jspHorizontalBar"); G = am.find(">.jspTrack"); i = G.find(">.jspDrag"); if (ay.showArrows) {
                        ax = b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp", aD(-1, 0)).bind("click.jsp", aB); y = b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp", aD(1, 0)).bind("click.jsp", aB); if (ay.arrowScrollOnHover) {
                            ax.bind("mouseover.jsp", aD(-1, 0, ax));
                            y.bind("mouseover.jsp", aD(1, 0, y))
                        } ak(G, ay.horizontalArrowPositions, ax, y)
                    } i.hover(function() { i.addClass("jspHover") }, function() { i.removeClass("jspHover") }).bind("mousedown.jsp", function(aJ) { b("html").bind("dragstart.jsp selectstart.jsp", aB); i.addClass("jspActive"); var s = aJ.pageX - i.position().left; b("html").bind("mousemove.jsp", function(aK) { V(aK.pageX - s, false) }).bind("mouseup.jsp mouseleave.jsp", aw); return false }); m = al.innerWidth(); ag()
                } 
            } function ag() { al.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function() { m -= b(this).outerWidth() }); G.width(m + "px"); Z = 0 } function F() { if (aE && az) { var aJ = G.outerHeight(), s = ap.outerWidth(); u -= aJ; b(am).find(">.jspCap:visible,>.jspArrow").each(function() { m += b(this).outerWidth() }); m -= s; w -= s; aj -= aJ; G.parent().append(b('<div class="jspCorner" />').css("width", aJ + "px")); p(); ag() } if (aE) { X.width((al.outerWidth() - g) + "px") } Y = X.outerHeight(); r = Y / w; if (aE) { at = Math.ceil(1 / z * m); if (at > ay.horizontalDragMaxWidth) { at = ay.horizontalDragMaxWidth } else { if (at < ay.horizontalDragMinWidth) { at = ay.horizontalDragMinWidth } } i.width(at + "px"); k = m - at; ad(Z) } if (az) { B = Math.ceil(1 / r * u); if (B > ay.verticalDragMaxHeight) { B = ay.verticalDragMaxHeight } else { if (B < ay.verticalDragMinHeight) { B = ay.verticalDragMinHeight } } au.height(B + "px"); j = u - B; ac(I) } } function ak(aK, aM, aJ, s) { var aO = "before", aL = "after", aN; if (aM == "os") { aM = /Mac/.test(navigator.platform) ? "after" : "split" } if (aM == aO) { aL = aM } else { if (aM == aL) { aO = aM; aN = aJ; aJ = s; s = aN } } aK[aO](aJ)[aL](s) } function aD(aJ, s, aK) { return function() { H(aJ, s, this, aK); this.blur(); return false } } function H(aM, aL, aP, aO) { aP = b(aP).addClass("jspActive"); var aN, aK, aJ = true, s = function() { if (aM !== 0) { P.scrollByX(aM * ay.arrowButtonSpeed) } if (aL !== 0) { P.scrollByY(aL * ay.arrowButtonSpeed) } aK = setTimeout(s, aJ ? ay.initialDelay : ay.arrowRepeatFreq); aJ = false }; s(); aN = aO ? "mouseout.jsp" : "mouseup.jsp"; aO = aO || b("html"); aO.bind(aN, function() { aP.removeClass("jspActive"); aK && clearTimeout(aK); aK = null; aO.unbind(aN); aG() }) } function q() { x(); if (az) { ap.bind("mousedown.jsp", function(aO) { if (aO.originalTarget === c || aO.originalTarget == aO.currentTarget) { var aM = b(this), aP = aM.offset(), aN = aO.pageY - aP.top - I, aK, aJ = true, s = function() { var aS = aM.offset(), aT = aO.pageY - aS.top - B / 2, aQ = w * ay.scrollPagePercent, aR = j * aQ / (Y - w); if (aN < 0) { if (I - aR > aT) { P.scrollByY(-aQ) } else { U(aT) } } else { if (aN > 0) { if (I + aR < aT) { P.scrollByY(aQ) } else { U(aT) } } else { aL(); return } } aK = setTimeout(s, aJ ? ay.initialDelay : ay.trackClickRepeatFreq); aJ = false }, aL = function() { aK && clearTimeout(aK); aK = null; b(document).unbind("mouseup.jsp", aL); aG() }; s(); b(document).bind("mouseup.jsp", aL); return false } }) } if (aE) { G.bind("mousedown.jsp", function(aO) { if (aO.originalTarget === c || aO.originalTarget == aO.currentTarget) { var aM = b(this), aP = aM.offset(), aN = aO.pageX - aP.left - Z, aK, aJ = true, s = function() { var aS = aM.offset(), aT = aO.pageX - aS.left - at / 2, aQ = aj * ay.scrollPagePercent, aR = k * aQ / (S - aj); if (aN < 0) { if (Z - aR > aT) { P.scrollByX(-aQ) } else { V(aT) } } else { if (aN > 0) { if (Z + aR < aT) { P.scrollByX(aQ) } else { V(aT) } } else { aL(); return } } aK = setTimeout(s, aJ ? ay.initialDelay : ay.trackClickRepeatFreq); aJ = false }, aL = function() { aK && clearTimeout(aK); aK = null; b(document).unbind("mouseup.jsp", aL); aG() }; s(); b(document).bind("mouseup.jsp", aL); return false } }) } } function x() { if (G) { G.unbind("mousedown.jsp") } if (ap) { ap.unbind("mousedown.jsp") } } function aw() { b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"); if (au) { au.removeClass("jspActive") } if (i) { i.removeClass("jspActive") } aG() } function U(s, aJ) { if (!az) { return } if (s < 0) { s = 0 } else { if (s > j) { s = j } } if (aJ === c) { aJ = ay.animateScroll } if (aJ) { P.animate(au, "top", s, ac) } else { au.css("top", s); ac(s) } } function ac(aJ) { if (aJ === c) { aJ = au.position().top } al.scrollTop(0); I = aJ; var aM = I === 0, aK = I == j, aL = aJ / j, s = -aL * (Y - w); if (ai != aM || aH != aK) { ai = aM; aH = aK; D.trigger("jsp-arrow-change", [ai, aH, O, l]) } v(aM, aK); X.css("top", s); D.trigger("jsp-scroll-y", [-s, aM, aK]).trigger("scroll") } function V(aJ, s) { if (!aE) { return } if (aJ < 0) { aJ = 0 } else { if (aJ > k) { aJ = k } } if (s === c) { s = ay.animateScroll } if (s) { P.animate(i, "left", aJ, ad) } else { i.css("left", aJ); ad(aJ) } } function ad(aJ) {
                if (aJ === c) {
                    aJ = i.position().left
                } al.scrollTop(0); Z = aJ; var aM = Z === 0, aL = Z == k, aK = aJ / k, s = -aK * (S - aj); if (O != aM || l != aL) { O = aM; l = aL; D.trigger("jsp-arrow-change", [ai, aH, O, l]) } t(aM, aL); X.css("left", s); D.trigger("jsp-scroll-x", [-s, aM, aL]).trigger("scroll")
            } function v(aJ, s) { if (ay.showArrows) { aq[aJ ? "addClass" : "removeClass"]("jspDisabled"); ae[s ? "addClass" : "removeClass"]("jspDisabled") } } function t(aJ, s) { if (ay.showArrows) { ax[aJ ? "addClass" : "removeClass"]("jspDisabled"); y[s ? "addClass" : "removeClass"]("jspDisabled") } } function L(s, aJ) { var aK = s / (Y - w); U(aK * j, aJ) } function M(aJ, s) { var aK = aJ / (S - aj); V(aK * k, s) } function aa(aV, aQ, aK) { var aO, aL, aM, s = 0, aU = 0, aJ, aP, aS, aR, aT; try { aO = b(aV) } catch (aN) { return } aL = aO.outerHeight(); aM = aO.outerWidth(); al.scrollTop(0); al.scrollLeft(0); while (!aO.is(".jspPane")) { s += aO.position().top; aU += aO.position().left; aO = aO.offsetParent(); if (/^body|html$/i.test(aO[0].nodeName)) { return } } aJ = aA(); aP = aJ + w; if (s < aJ || aQ) { aR = s - ay.verticalGutter } else { if (s + aL > aP) { aR = s - w + aL + ay.verticalGutter } } if (aR) { L(aR, aK) } viewportLeft = aC(); aS = viewportLeft + aj; if (aU < viewportLeft || aQ) { aT = aU - ay.horizontalGutter } else { if (aU + aM > aS) { aT = aU - aj + aM + ay.horizontalGutter } } if (aT) { M(aT, aK) } } function aC() { return -X.position().left } function aA() { return -X.position().top } function af() { al.unbind(ab).bind(ab, function(aM, aN, aL, aJ) { var aK = Z, s = I; P.scrollBy(aL * ay.mouseWheelSpeed, -aJ * ay.mouseWheelSpeed, false); return aK == Z && s == I }) } function o() { al.unbind(ab) } function aB() { return false } function J() { X.find(":input,a").unbind("focus.jsp").bind("focus.jsp", function(s) { aa(s.target, false) }) } function E() { X.find(":input,a").unbind("focus.jsp") } function R() { var s, aJ; X.focus(function() { D.focus() }); D.attr("tabindex", 0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp", function(aN) { if (aN.target !== this) { return } var aM = Z, aL = I; switch (aN.keyCode) { case 40: case 38: case 34: case 32: case 33: case 39: case 37: s = aN.keyCode; aK(); break; case 35: L(Y - w); s = null; break; case 36: L(0); s = null; break } aJ = aN.keyCode == s && aM != Z || aL != I; return !aJ }).bind("keypress.jsp", function(aL) { if (aL.keyCode == s) { aK() } return !aJ }); if (ay.hideFocus) { D.css("outline", "none"); if ("hideFocus" in al[0]) { D.attr("hideFocus", true) } } else { D.css("outline", ""); if ("hideFocus" in al[0]) { D.attr("hideFocus", false) } } function aK() { var aM = Z, aL = I; switch (s) { case 40: P.scrollByY(ay.keyboardSpeed, false); break; case 38: P.scrollByY(-ay.keyboardSpeed, false); break; case 34: case 32: P.scrollByY(w * ay.scrollPagePercent, false); break; case 33: P.scrollByY(-w * ay.scrollPagePercent, false); break; case 39: P.scrollByX(ay.keyboardSpeed, false); break; case 37: P.scrollByX(-ay.keyboardSpeed, false); break } aJ = aM != Z || aL != I; return aJ } } function Q() { D.attr("tabindex", "-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp") } function C() { if (location.hash && location.hash.length > 1) { var aK, aJ; try { aK = b(location.hash) } catch (s) { return } if (aK.length && X.find(location.hash)) { if (al.scrollTop() === 0) { aJ = setInterval(function() { if (al.scrollTop() > 0) { aa(location.hash, true); b(document).scrollTop(al.position().top); clearInterval(aJ) } }, 50) } else { aa(location.hash, true); b(document).scrollTop(al.position().top) } } } } function ah() { b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack") } function n() { ah(); b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack", function() { var s = this.href.split("#"), aJ; if (s.length > 1) { aJ = s[1]; if (aJ.length > 0 && X.find("#" + aJ).length > 0) { aa("#" + aJ, true); return false } } }) } function aG() { if (!b(":focus").length) { D.focus() } } function an() { var aK, aJ, aM, aL, aN, s = false; al.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp", function(aO) { var aP = aO.originalEvent.touches[0]; aK = aC(); aJ = aA(); aM = aP.pageX; aL = aP.pageY; aN = false; s = true }).bind("touchmove.jsp", function(aR) { if (!s) { return } var aQ = aR.originalEvent.touches[0], aP = Z, aO = I; P.scrollTo(aK + aM - aQ.pageX, aJ + aL - aQ.pageY); aN = aN || Math.abs(aM - aQ.pageX) > 5 || Math.abs(aL - aQ.pageY) > 5; return aP == Z && aO == I }).bind("touchend.jsp", function(aO) { s = false }).bind("click.jsp-touchclick", function(aO) { if (aN) { aN = false; return false } }) } function h() {
                var s = aA(), aJ = aC(); D.removeClass("jspScrollable").unbind(".jsp");
                D.replaceWith(ao.append(X.children())); ao.scrollTop(s); ao.scrollLeft(aJ)
            } b.extend(P, { reinitialise: function(aJ) { aJ = b.extend({}, ay, aJ); ar(aJ) }, scrollToElement: function(aK, aJ, s) { aa(aK, aJ, s) }, scrollTo: function(aK, s, aJ) { M(aK, aJ); L(s, aJ) }, scrollToX: function(aJ, s) { M(aJ, s) }, scrollToY: function(s, aJ) { L(s, aJ) }, scrollToPercentX: function(aJ, s) { M(aJ * (S - aj), s) }, scrollToPercentY: function(aJ, s) { L(aJ * (Y - w), s) }, scrollBy: function(aJ, s, aK) { P.scrollByX(aJ, aK); P.scrollByY(s, aK) }, scrollByX: function(s, aK) { var aJ = aC() + s, aL = aJ / (S - aj); V(aL * k, aK) }, scrollByY: function(s, aK) { var aJ = aA() + s, aL = aJ / (Y - w); U(aL * j, aK) }, positionDragX: function(s, aJ) { V(s, aJ) }, positionDragY: function(aJ, s) { V(aJ, s) }, animate: function(aJ, aM, s, aL) { var aK = {}; aK[aM] = s; aJ.animate(aK, { duration: ay.animateDuration, ease: ay.animateEase, queue: false, step: aL }) }, getContentPositionX: function() { return aC() }, getContentPositionY: function() { return aA() }, getContentWidth: function() { return S() }, getContentHeight: function() { return Y() }, getPercentScrolledX: function() { return aC() / (S - aj) }, getPercentScrolledY: function() { return aA() / (Y - w) }, getIsScrollableH: function() { return aE }, getIsScrollableV: function() { return az }, getContentPane: function() { return X }, scrollToBottom: function(s) { U(j, s) }, hijackInternalLinks: function() { n() }, destroy: function() { h() } }); ar(N)
        } f = b.extend({}, b.fn.jScrollPane.defaults, f); b.each(["mouseWheelSpeed", "arrowButtonSpeed", "trackClickSpeed", "keyboardSpeed"], function() { f[this] = f[this] || f.speed }); var e; this.each(function() { var g = b(this), h = g.data("jsp"); if (h) { h.reinitialise(f) } else { h = new d(g, f); g.data("jsp", h) } e = e ? e.add(g) : g }); return e
    }; b.fn.jScrollPane.defaults = { showArrows: false, maintainPosition: true, clickOnTrack: true, autoReinitialise: false, autoReinitialiseDelay: 500, verticalDragMinHeight: 0, verticalDragMaxHeight: 99999, horizontalDragMinWidth: 0, horizontalDragMaxWidth: 99999, animateScroll: false, animateDuration: 300, animateEase: "linear", hijackInternalLinks: false, verticalGutter: 4, horizontalGutter: 4, mouseWheelSpeed: 0, arrowButtonSpeed: 0, arrowRepeatFreq: 50, arrowScrollOnHover: false, trackClickSpeed: 0, trackClickRepeatFreq: 70, verticalArrowPositions: "split", horizontalArrowPositions: "split", enableKeyboardNavigation: true, hideFocus: false, keyboardSpeed: 0, initialDelay: 300, speed: 30, scrollPagePercent: 0.8}
})(jQuery, this);


(function($) { $.fn.jCarouselLite = function(o) { o = $.extend({ btnPrev: null, btnNext: null, btnGo: null, mouseWheel: false, auto: null, speed: 200, easing: null, vertical: false, circular: true, visible: 3, start: 0, scroll: 1, beforeStart: null, afterEnd: null }, o || {}); return this.each(function() { var b = false, animCss = o.vertical ? "top" : "left", sizeCss = o.vertical ? "height" : "width"; var c = $(this), ul = $("ul", c), tLi = $("li", ul), tl = tLi.size(), v = o.visible; if (o.circular) { ul.prepend(tLi.slice(tl - v - 1 + 1).clone()).append(tLi.slice(0, v).clone()); o.start += v } var f = $("li", ul), itemLength = f.size(), curr = o.start; c.css("visibility", "visible"); f.css({ overflow: "hidden", float: o.vertical ? "none" : "left" }); ul.css({ margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1" }); c.css({ overflow: "hidden", position: "relative", "z-index": "2", left: "0px" }); var g = o.vertical ? height(f) : width(f); var h = g * itemLength; var j = g * v; f.css({ width: f.width(), height: f.height() }); ul.css(sizeCss, h + "px").css(animCss, -(curr * g)); c.css(sizeCss, j + "px"); if (o.btnPrev) $(o.btnPrev).click(function() { return go(curr - o.scroll) }); if (o.btnNext) $(o.btnNext).click(function() { return go(curr + o.scroll) }); if (o.btnGo) $.each(o.btnGo, function(i, a) { $(a).click(function() { return go(o.circular ? o.visible + i : i) }) }); if (o.mouseWheel && c.mousewheel) c.mousewheel(function(e, d) { return d > 0 ? go(curr - o.scroll) : go(curr + o.scroll) }); if (o.auto) setInterval(function() { go(curr + o.scroll) }, o.auto + o.speed); function vis() { return f.slice(curr).slice(0, v) }; function go(a) { if (!b) { if (o.beforeStart) o.beforeStart.call(this, vis()); if (o.circular) { if (a <= o.start - v - 1) { ul.css(animCss, -((itemLength - (v * 2)) * g) + "px"); curr = a == o.start - v - 1 ? itemLength - (v * 2) - 1 : itemLength - (v * 2) - o.scroll } else if (a >= itemLength - v + 1) { ul.css(animCss, -((v) * g) + "px"); curr = a == itemLength - v + 1 ? v + 1 : v + o.scroll } else curr = a } else { if (a < 0 || a > itemLength - v) return; else curr = a } b = true; ul.animate(animCss == "left" ? { left: -(curr * g)} : { top: -(curr * g) }, o.speed, o.easing, function() { if (o.afterEnd) o.afterEnd.call(this, vis()); b = false }); if (!o.circular) { $(o.btnPrev + "," + o.btnNext).removeClass("disabled"); $((curr - o.scroll < 0 && o.btnPrev) || (curr + o.scroll > itemLength - v && o.btnNext) || []).addClass("disabled") } } return false } }) }; function css(a, b) { return parseInt($.css(a[0], b)) || 0 }; function width(a) { return a[0].offsetWidth + css(a, 'marginLeft') + css(a, 'marginRight') }; function height(a) { return a[0].offsetHeight + css(a, 'marginTop') + css(a, 'marginBottom') } })(jQuery);
