/*******************/
/*CUSTOM*/
/*******************/

(function ($) {
    $(document).ready(function() {

        /*Slider unterscheiden*/
        $('.slider:eq(0)').addClass('slider_one');
        $('.slider:eq(1)').addClass('slider_two');
        $('.slider:eq(2)').addClass('slider_three');
        $('.slider:eq(3)').addClass('slider_four');
        $('.slider:eq(4)').addClass('slider_five');
        $('.slider:eq(5)').addClass('slider_six');
        $('.slider:eq(6)').addClass('slider_seven');
        $('.slider:eq(7)').addClass('slider_eight');
        $('.slider:eq(8)').addClass('slider_nine');

        var fxEffect = 'fade';
        
        /*Sliders*/
        $('.slider_one').cycle({
            fx: fxEffect,
            timeout:5500,
            speed: 1500,
            pause: 1
        });
        $('.slider_two').cycle({
            fx: fxEffect,
            timeout:7500,
            speed: 1500,
            pause: 1
        });
        $('.slider_three').cycle({
            fx: fxEffect,
            timeout:9500,
            speed: 1500,
            pause: 1
        });
        $('.slider_four').cycle({
            fx: fxEffect,
            timeout:5500,
            speed: 1500,
            pause: 1
        });
        $('.slider_five').cycle({
            fx: fxEffect,
            timeout:7500,
            speed: 1500,
            pause: 1
        });
        $('.slider_six').cycle({
            fx: fxEffect,
            timeout:9500,
            speed: 1500,
            pause: 1
        });
        $('.slider_seven').cycle({
            fx: fxEffect,
            timeout:5500,
            speed: 1500,
            pause: 1
        });
        $('.slider_eight').cycle({
            fx: fxEffect,
            timeout:7500,
            speed: 1500,
            pause: 1
        });
        $('.slider_nine').cycle({
            fx: fxEffect,
            timeout:9500,
            speed: 1500,
            pause: 1
        });

        /*Lightbox*/
        $('.lightbox').lightbox();

        /*Hauptmenü Farben zuweisen*/
        $('#hauptmenu > div > div > div > ul.menu > li > a:eq(0)').addClass("eins");
        $('#hauptmenu > div > div > div > ul.menu > li > a:eq(1)').addClass("zwei");
        $('#hauptmenu > div > div > div > ul.menu > li > a:eq(2)').addClass("drei");
        $('#hauptmenu > div > div > div > ul.menu > li > a:eq(3)').addClass("vier");
        $('#hauptmenu > div > div > div > ul.menu > li > a:eq(4)').addClass("fuenf");

        /*div-Höhen*/
        var sidebar = $("#sidebar").height();
        var hoehe_sidebar = sidebar-83;
        var hoehe_sidebar_ie7 = sidebar-96;
        var hoehe_inhalt = $("#content").height();
        if(hoehe_inhalt < hoehe_sidebar){
            $("#content").height(hoehe_sidebar);
        }
        if(hoehe_inhalt > hoehe_sidebar){
            var hoehe_platzhalter = hoehe_inhalt - hoehe_sidebar;
            var hoehe_platzhalter_ie7 = hoehe_inhalt - hoehe_sidebar_ie7;

            if ($.browser.msie && $.browser.version.substr(0,1)<8) {
                $("#platzhalter").height(hoehe_platzhalter_ie7);
            } else {
                $("#platzhalter").height(hoehe_platzhalter);
            }
        }

        /*User-Login*/
        $('#kundenlogin > form > div > #edit-actions > input[id=edit-submit]').val('>');
        $('#kundenlogin > form > div > div.form-item > input[id=edit-name]').val('kunde');

        /*Produkteübersicht*/
        $('.nolink').css('cursor','pointer').click(function() {
            $('#produkte').slideToggle(250,'swing');

        });
        $('#produkte a').attr("target", "_blank");

        //Browser-Fixes
        if ($.browser.msie && $.browser.version.substr(0,1)<8) {
            $('#hauptmenu').height(37);
        }
        if ($.browser.msie && $.browser.version.substr(0,1)<7) {
            $('#ie6_warning').show();
        }

        //TABS VERSTECKEN BEI NEWS UND VIDEO -VIEWS
        if($('#page-title').text() == 'Aktuell' || $('#page-title').text() == 'News' || $('#page-title').text() == 'Videos'){
            $('.tabs').hide();
        };

        //FLASHFIX
        fix_flash();

    });
})(jQuery);



/*FLASHFIX FUNCTION*/
function fix_flash() {
    // loop through every embed tag on the site
    var embeds = document.getElementsByTagName('embed');
    for (i = 0; i < embeds.length; i++) {
        embed = embeds[i];
        var new_embed;
        // everything but Firefox & Konqueror
        if (embed.outerHTML) {
            var html = embed.outerHTML;
            // replace an existing wmode parameter
            if (html.match(/wmode\s*=\s*('|")[a-zA-Z]+('|")/i))
                new_embed = html.replace(/wmode\s*=\s*('|")window('|")/i, "wmode='transparent'");
            // add a new wmode parameter
            else
                new_embed = html.replace(/<embed\s/i, "<embed wmode='transparent' ");
            // replace the old embed object with the fixed version
            embed.insertAdjacentHTML('beforeBegin', new_embed);
            embed.parentNode.removeChild(embed);
        } else {
            // cloneNode is buggy in some versions of Safari & Opera, but works fine in FF
            new_embed = embed.cloneNode(true);
            if (!new_embed.getAttribute('wmode') || new_embed.getAttribute('wmode').toLowerCase() == 'window')
                new_embed.setAttribute('wmode', 'transparent');
            embed.parentNode.replaceChild(new_embed, embed);
        }
    }
    // loop through every object tag on the site
    var objects = document.getElementsByTagName('object');
    for (i = 0; i < objects.length; i++) {
        object = objects[i];
        var new_object;
        // object is an IE specific tag so we can use outerHTML here
        if (object.outerHTML) {
            var html = object.outerHTML;
            // replace an existing wmode parameter
            if (html.match(/<param\s+name\s*=\s*('|")wmode('|")\s+value\s*=\s*('|")[a-zA-Z]+('|")\s*\/?\>/i))
                new_object = html.replace(/<param\s+name\s*=\s*('|")wmode('|")\s+value\s*=\s*('|")window('|")\s*\/?\>/i, "<param name='wmode' value='transparent' />");
            // add a new wmode parameter
            else
                new_object = html.replace(/<\/object\>/i, "<param name='wmode' value='transparent' />\n</object>");
            // loop through each of the param tags
            var children = object.childNodes;
            for (j = 0; j < children.length; j++) {
                try {
                    if (children[j] != null) {
                        var theName = children[j].getAttribute('name');
                        if (theName != null && theName.match(/flashvars/i)) {
                            new_object = new_object.replace(/<param\s+name\s*=\s*('|")flashvars('|")\s+value\s*=\s*('|")[^'"]*('|")\s*\/?\>/i, "<param name='flashvars' value='" + children[j].getAttribute('value') + "' />");
                        }
                    }
                }
                catch (err) {
                }
            }
            // replace the old embed object with the fixed versiony
            object.insertAdjacentHTML('beforeBegin', new_object);
            object.parentNode.removeChild(object);
        }
    }
};
/*!
 * jQuery Lightbox Evolution - for jQuery 1.3+
 * http://codecanyon.net/item/jquery-lightbox-evolution/115655?ref=aeroalquimia
 *
 * Copyright 2010, Eduardo Daniel Sada
 * You need to buy a license if you want use this script.
 * http://codecanyon.net/wiki/buying/howto-buying/licensing/
 *
 * Version: 1.4.3 (Mar 09 2011)
 *
 * Includes jQuery Easing v1.3
 * http://gsgd.co.uk/sandbox/jquery/easing/
 * Copyright (c) 2008 George McGinley Smith
 * Released under the BSD License.
 */

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}('(C($){E p=($.1y.2s&&1z($.1y.2t,10)<7&&1z($.1y.2t,10)>4);r($.J===1Z){$.1g({J:C(a,b){r(a){J=C(){O a.3s(b||8,4E)}};O J}})};r($.2N===1Z){$.1g({2N:C(a){3t(E b 4F a){O Q}O M}})};$.1g($.2u.4G,{4H:C(){r(8.u.2v){8.u.2v.4I(8.4J,8.4K,8)}(2e.2u.2v[8.4L]||2e.2u.2v.4M)(8)}});$.1g($.3u,{21:C(x,t,b,c,d,s){r(s==1Z)s=1.4N;O c*((t=t/d-1)*t*((s+1)*t+s)+1)+b}});$.1g({2f:{3v:{D:\'3w-R\',1h:4O,A:4P,B:4Q,U:\'#4R\',2w:Q,1i:{\'1A\':0.6},2x:3x,2y:4S,4T:3y,4U:3y,4V:\'21\',4W:\'21\',4X:\'21\',4Y:\'21\',22:{\'3z\':10,\'2O\':23,\'1B\':\'21\',\'3A\':2},1C:{\'A\':4Z,\'B\':51},3B:\'1d\'},u:{},1O:{},X:{},1b:{},q:{R:[],F:{1j:[],1P:[],18:[],1Q:[]},U:[],V:[]},1a:Q,1u:Q,1D:\'1b\',3C:{1E:{12:/[^\\.]\\.(1E)\\s*$/i},2z:{12:/2z\\.K\\/3D/i,N:\'=\',11:1,1e:1,Z:"17://1q.2z.K/v/%S%&H;1m=1&H;3E=1&H;2g=0",Z:"17://1q.2z.K/2h/%S%?1m=1&H;3E=1&H;2g=0"},2P:{12:/2P\\.K\\/3D/i,N:\'/\',11:4,Z:"17://1q.2P.K/52/%S%/.1E?53=54=55"},2Q:{12:/2Q\\.K\\/24/i,N:\'/\',11:4,Z:"17://1q.2Q.K/1E/24/%S%?56=0&H;57=1"},1F:{12:/1F\\.K\\/58/i,N:\'=\',11:1,Z:"17://24.1F.K/59.1E?1m=1&H;5a=5b&H;5c=%S%"},2i:{12:/2i\\.K/i,N:\'/\',11:3,1e:1,Z:"17://2i.K/2R.1E?3F=%S%&H;5d=2i.K&H;1m=1&H;3G=1&H;3H=1&H;3I=0&H;3J=&H;2S=1",Z:"17://2T.2i.K/24/%S%?1m=1&H;3G=1&H;3H=1&H;3I=0&H;3J=&H;2S=1"},2U:{12:/2U.K/i,N:\'=\',11:1,Z:"17://1q.2U.K/v/%S%"},2V:{12:/2V.K/i,N:\'/\',11:5,Z:"17://1q.2V.K/5e.5f?5g=%S%"},2W:{12:/2W.K/i,N:\'24:\',11:1,Z:"17://1q.2W.K/2R/2R.1E?1m=M&H;2S=1&H;3F=%S%"},2X:{12:/2X.3K/i,N:\'/\',11:4,Z:"17://1q.2X.3K/1C/24/%S%?5h=%2F&H;1m=M&H;5i=%S%&H;5j=M&H;5k=0.5l&H;5m=0.5n&H;5o=5p"},2Y:{12:/2Y.K/i,N:\'/\',11:3,Z:"17://1q.2Y.K/2T/%S%"},3L:{12:/v.3L.K/i,N:\'/\',11:3,Z:"17://5q.5r.K/2T.1E?5s=%S%&H;v=1.5t"},2Z:{12:/2Z.K\\/5u/i,N:\'/\',11:4,Z:"17://5v.2Z.K/%S%.5w?1m=M&H;1G=1H"}},3M:{31:{12:/31.K\\/25/i,N:\'?\',11:1,Z:"17://1q.31.K/25/2h/?5x=5y-5z-5A-5B-5C&H;w=%A%&H;h=%B%&H;%S%"},5D:{12:/25.1F.K(.*)5E=c/i,N:\'?\',11:1,Z:"17://25.1F.K/?3N=5F&H;%S%"},1F:{12:/25.1F.K/i,N:\'?\',11:1,Z:"17://25.1F.K/?3N=2h&H;%S%"}},32:/\\.(5G|5H|5I|5J|5K|5L)(.*)?$/i,1i:{2A:C(b){8.u=b;8.W=$(\'<G S="\'+2j 33().34()+\'" T="\'+8.u.D+\'-1i"></G>\');8.W.I($.1g({},{\'1r\':\'5M\',\'1d\':0,\'13\':0,\'1A\':0,\'1v\':\'1H\',\'z-11\':8.u.1h},8.u.26));8.W.1n($.J(C(a){r(8.u.2B){r($.1R(8.u.1I)){8.u.1I()}L{8.1s()}}a.1S()},8));8.2k=M;8.3O();O 8},3O:C(){8.2C=$(2D.35);8.2C.28(8.W);r(p){8.W.I({\'1r\':\'2l\'});E a=1z(8.W.I(\'1h\'));r(!a){a=1;E b=8.W.I(\'1r\');r(b==\'3P\'||!b){8.W.I({\'1r\':\'5N\'})}8.W.I({\'1h\':a})}a=(!!(8.u.1h||8.u.1h===0)&&a>8.u.1h)?8.u.1h:a-1;r(a<0){a=1}8.1k=$(\'<1e S="3Q\'+2j 33().34()+\'" 5O="5P" 3R=0 1T=""></1e>\');8.1k.I({1h:a,1r:\'2l\',1d:0,13:0,1G:\'1H\',A:0,B:0,1A:0});8.1k.5Q(8.W);$(\'V, 35\').I({\'B\':\'23%\',\'A\':\'23%\',\'3S-13\':0,\'3S-29\':0})}},15:C(x,y){8.W.I({\'B\':0,\'A\':0});r(8.1k){8.1k.I({\'B\':0,\'A\':0})};E a={x:$(2D).A(),y:$(2D).B()};8.W.I({\'A\':\'23%\',\'B\':y?y:a.y});r(8.1k){8.1k.I({\'B\':0,\'A\':0});8.1k.I({\'1r\':\'2l\',\'13\':0,\'1d\':0,\'A\':8.W.A(),\'B\':y?y:a.y})}O 8},Y:C(a){r(!8.2k){O 8};r(8.1B){8.1B.1U()};r(8.1k){8.1k.I({\'1v\':\'36\'})};8.W.I({\'1v\':\'36\',\'1A\':0});8.2C.1f(\'15\',$.J(8.15,8));8.15();8.2k=Q;8.1B=8.W.3T(8.u.2x,8.u.26.1A,$.J(C(){r(8.u.26.1A){8.W.I(8.u.26)};8.W.38(\'Y\');r($.1R(a)){a()}},8));O 8},1s:C(a){r(8.2k){O 8};r(8.1B){8.1B.1U()};r(8.1k){8.1k.I({\'1v\':\'1H\'})};8.2C.2a(\'15\');8.2k=M;8.1B=8.W.3T(8.u.2y,0,$.J(C(){8.W.38(\'1s\');r($.1R(a)){a()};8.W.I({\'B\':0,\'A\':0,\'1v\':\'1H\'})},8));O 8}},2A:C(a){8.u=$.1g(M,8.3v,a);8.1i.2A({D:8.u.D,26:8.u.1i,2B:!8.u.2w,1h:8.u.1h-1,1I:$.J(8.1j,8),2x:8.u.2x,2y:8.u.2y});8.q.R=$(\'<G T="\'+8.u.D+\' \'+8.u.D+\'-1D-1b"><G T="\'+8.u.D+\'-1G-1d-13"></G><G T="\'+8.u.D+\'-1G-1d-3U"></G><G T="\'+8.u.D+\'-1G-1d-29"></G><a T="\'+8.u.D+\'-19-1j" 1w="#1j"><1l>5R</1l></a><G T="\'+8.u.D+\'-1V"><a T="\'+8.u.D+\'-19-13" 1w="#"><1l>3V</1l></a><a T="\'+8.u.D+\'-19-29" 1w="#"><1l>3W</1l></a></G><G T="\'+8.u.D+\'-F"><G T="\'+8.u.D+\'-F-5S"></G><a T="\'+8.u.D+\'-19-13" 1w="#"><1l>3V</1l></a><a T="\'+8.u.D+\'-19-18" 1w="#"><1l>5T</1l></a><G T="\'+8.u.D+\'-F-1J"></G><a T="\'+8.u.D+\'-19-29" 1w="#"><1l>3W</1l></a><G T="\'+8.u.D+\'-F-5U"></G></G><G T="\'+8.u.D+\'-U"></G><G T="\'+8.u.D+\'-V"></G><G T="\'+8.u.D+\'-1G-2E-13"></G><G T="\'+8.u.D+\'-1G-2E-3U"></G><G T="\'+8.u.D+\'-1G-2E-29"></G></G>\');8.q.1V=$(\'.\'+8.u.D+\'-1V\',8.q.R);8.q.F.G=$(\'.\'+8.u.D+\'-F\',8.q.R);8.q.F.1j=$(\'.\'+8.u.D+\'-19-1j\',8.q.R);8.q.F.1P=$(\'.\'+8.u.D+\'-19-13\',8.q.R);8.q.F.18=$(\'.\'+8.u.D+\'-19-18\',8.q.R);8.q.F.1Q=$(\'.\'+8.u.D+\'-19-29\',8.q.R);8.q.F.1J=$(\'.\'+8.u.D+\'-F-1J\',8.q.R);8.q.U=$(\'.\'+8.u.D+\'-U\',8.q.R);8.q.V=$(\'.\'+8.u.D+\'-V\',8.q.R);8.q.P=$(\'<G T="\'+8.u.D+\'-P"></G>\').28(8.q.R);8.q.P.I({\'1r\':\'2l\',\'z-11\':8.u.1h,\'1d\':-3X,\'13\':-3X});$(\'35\').28(8.q.P);8.3Y();O 8.q.R},3Y:C(){8.q.F.1j.1f(\'1n\',$.J(C(a){8.1j();a.1S()},8));$(1c).1f(\'15\',$.J(C(){r(8.1a){8.1i.15();r(!8.1u){8.1W()}}},8));$(1c).1f(\'5V\',$.J(C(){r(8.1a&&!8.1u){8.1W()}},8));$(2D).1f(\'5W\',$.J(C(a){r(8.1a){r(a.3a==27&&8.1i.u.2B){8.1j()}r(8.X.2m>1){r(a.3a==37){8.q.F.1P.2G(\'1n\',a)}r(a.3a==39){8.q.F.1Q.2G(\'1n\',a)}}}},8));8.q.F.18.1f(\'1n\',$.J(C(a){8.3Z();a.1S()},8));8.1i.W.1f(\'Y\',$.J(C(){$(8).2G(\'Y\')},8));8.1i.W.1f(\'1s\',$.J(C(){$(8).2G(\'1j\')},8))},41:C(b){r($.2H(b)&&b.2b>1&&b[0].1K(8.32)){8.X.3b=b;8.X.1o=0;8.X.2m=b.2b;b=b[0];8.q.F.1P.2a(\'1n\');8.q.F.1Q.2a(\'1n\');8.q.F.1P.1f(\'1n\',$.J(C(a){r(8.X.1o-1<0){8.X.1o=8.X.2m-1}L{8.X.1o=8.X.1o-1}8.Y(8.X.3b[8.X.1o]);a.1S()},8));8.q.F.1Q.1f(\'1n\',$.J(C(a){r(8.X.1o+1>=8.X.2m){8.X.1o=0}L{8.X.1o=8.X.1o+1}8.Y(8.X.3b[8.X.1o]);a.1S()},8))}r(8.X.2m>1){r(8.q.1V.I("1v")=="1H"){8.q.F.G.Y()}8.q.F.1P.Y();8.q.F.1Q.Y()}L{8.q.F.1P.1s();8.q.F.1Q.1s()}},42:C(b,c){$.1L(b,$.J(C(i,a){8.q.F.1J.28($(\'<a 1w="#" T="\'+a[\'T\']+\'">\'+a.V+\'</a>\').1f(\'1n\',$.J(C(e){r($.1R(a.1I)){a.1I(8.1b.1T,8,c)}e.1S()},8)))},8));8.q.F.G.Y()},Y:C(b,c,d,f){E g=\'\';E h=Q;r(($.2H(b)&&b.2b<=1)||b==\'\'){O Q};8.2c();h=8.1a;8.43();r(!h){8.1W()};8.41(b,c);r($.2H(b)&&b.2b>1){b=b[0]}E j=b.N("%44%");E b=j[0];E k=j[1]||\'\';c=$.1g(M,{\'A\':0,\'B\':0,\'2w\':0,\'3c\':\'\',\'1X\':k,\'3d\':M,\'P\':-1,\'1e\':Q,\'2I\':\'\'},c||{});3e=8.45(b);r(!$.2N(3e)){c=$.1g({},c,3e)}E l={x:$(1c).A(),y:$(1c).B()};r(c.A&&(c.A+\'\').1Y("p")>0){c.A=(l.x-20)*c.A.46(0,c.A.1Y("p"))/23}r(c.B&&(c.B+\'\').1Y("p")>0){c.B=(l.y-20)*c.B.46(0,c.B.1Y("p"))/23}8.q.U.2a(\'1M\');8.1i.u.2B=!c.2w;8.q.F.18.2n(8.u.D+\'-19-3f\');8.q.F.18.2o(8.u.D+\'-19-18\');8.1u=!(c.P>0||(c.P==-1&&c.3d));r($.2H(c.F)){8.42(c.F,f)}r(!8.q.F.1J.47(":1p")){8.q.F.G.Y()}r(c.3c!=\'\'){g=c.3c}L r(c.1e){g=\'1e\'}L r(b.1K(8.32)){g=\'1b\'}L{$.1L(8.3C,$.J(C(i,e){r(b.N(\'?\')[0].1K(e.12)){r(e.N){48=b.N(e.N)[e.11].N(\'?\')[0].N(\'&\')[0];b=e.Z.2J("%S%",48)}g=e.1e?\'1e\':\'1C\';c.A=c.A?c.A:8.u.1C.A;c.B=c.B?c.B:8.u.1C.B;O Q}},8));$.1L(8.3M,C(i,e){r(b.1K(e.12)){g=\'1e\';r(e.N){S=b.N(e.N)[e.11];b=e.Z.2J("%S%",S).2J("%A%",c.A).2J("%B%",c.B)}}});r(g==\'\'){r(b.1K(/#/)){3g=b.5X(b.1Y("#"));r($(3g).2b>0){g=\'3h\';b=3g}L{g=\'1N\'}}L{g=\'1N\'}}}r(g==\'1b\'){8.q.F.18.1s();E m=2j 5Y();m.49=$.J(C(){m.49=C(){};r(!8.1a){O Q};8.1b={A:m.A,B:m.B,1T:m.1T};r(c.A){A=1z(c.A);B=1z(c.B)}L{r(c.3d){E a=8.3i(m.A,m.B);A=a.A;B=a.B;r(m.A!=A||m.B!=B){8.q.F.G.Y();8.q.F.18.Y()}}L{A=m.A;B=m.B}}8.15(A,B);8.q.U.1f(\'1M\',$.J(C(){r(!8.1a){O Q};8.2K(\'1b\');8.q.U.1p();8.q.V.1p();r(c.1X!=\'\'){8.q.U.28($(\'<G T="\'+8.u.D+\'-1X"></G>\').V(c.1X))}$(m).1s();8.q.U.28(m);$(m).1U().5Z(3x)},8))},8);m.60=$.J(C(){8.2d("3j 4a 1b 4b 4c 3k. 4d 4e 4f 4g.")},8);m.1T=b}L r(g==\'1C\'||g==\'3h\'||g==\'1N\'){r(g==\'3h\'){8.2p($(b).61(M).Y(),c.A>0?c.A:$(b).4h(M),c.B>0?c.B:$(b).4i(M),\'V\')}L r(g==\'1N\'){r(c.A){A=c.A;B=c.B}L{8.2d("4j 4k 4l 4m 2L 4n 4o 2L R.");O Q}r(8.1O.1N){8.1O.1N.62()};8.1O.1N=$.1N({Z:b,4p:"63",64:Q,65:"V",2d:$.J(C(){8.2d("3j 4a 66 4b 4c 3k. 4d 4e 4f 4g.")},8),67:$.J(C(a){8.2p($(a),A,B,\'V\')},8)})}L r(g==\'1C\'){E n=8.4q(b,c.A,c.B,c.2I);8.2p($(n),c.A,c.B,\'V\')}}L r(g==\'1e\'){r(c.A){A=c.A;B=c.B}L{8.2d("4j 4k 4l 4m 2L 4n 4o 2L R.");O Q}8.2p($(\'<1e S="3Q\'+(2j 33().34())+\'" 3R=0 1T="\'+b+\'"></1e>\').I(c),c.A,c.B,\'V\')}8.1I=$.1R(d)?d:C(e){}},4q:C(a,b,c,d){r(3l d==\'1Z\'||d==\'\')d=\'3m=1&1m=1&68=1\';E e=\'<4r A="\'+b+\'" B="\'+c+\'" 69="6a:6b-6c-6d-6e-6f"><16 D="6g" 1x="\'+a+\'"></16>\';e+=\'<16 D="6h" 1x="M"></16><16 D="4s" 1x="4t"></16><16 D="4u" 1x="4v"></16>\';e+=\'<16 D="3m" 1x="M"></16><16 D="1m" 1x="M"></16><16 D="2I" 1x="\'+d+\'"></16>\';e+=\'<16 D="A" 1x="\'+b+\'"></16><16 D="B" 1x="\'+c+\'"></16>\';e+=\'<2h 1T="\'+a+\'" 4p="6i/x-6j-1C" 4s="4t" 6k="M" 3m="M" 1m="M" 2I="\'+d+\'" 4u="4v" A="\'+b+\'" B="\'+c+\'"></2h></4r>\';O e},2p:C(a,b,c,d){r(3l d!==\'1Z\'){8.2K(d)}8.15(b+30,c+20);8.q.U.1f(\'1M\',$.J(C(){8.q.U.2n(8.u.D+\'-2c\');8.q.V.V(a);8.q.V.V(a);8.q.U.2a(\'1M\')},8))},1W:C(w,h){E a={x:$(1c).A(),y:$(1c).B()};E b={x:$(1c).4w(),y:$(1c).4x()};E c=h!=3n?h:8.q.R.4i();E d=w!=3n?w:8.q.R.4h();E y=0;E x=0;x=b.x+((a.x-d)/2);r(8.1a){y=b.y+(a.y-c)/2}L r(8.u.3B=="2E"){y=(b.y+a.y+14)}L{y=(b.y-c)-14}r(8.1a){r(!8.1O.P){8.1t(8.q.P,{\'13\':x},\'P\')}8.1t(8.q.P,{\'1d\':y},\'P\')}L{8.q.P.I({\'13\':x,\'1d\':y})}},1t:C(d,f,g,h,i){E j=$.6l({2M:i||Q,2O:8.u[g+\'6m\'],3u:8.u[g+\'6n\'],1M:($.1R(h)?$.J(h,8):3n)});O d[j.2M===Q?"1L":"2M"](C(){E c=$.1g({},j),4y=8;c.6o=$.1g({},f);$.1L(f,C(a,b){E e=2j $.2u(4y,c,a);e.1J(e.6p(M)||0,b,"6q")});O M})},15:C(x,y){r(8.1a){E a={x:$(1c).A(),y:$(1c).B()};E b={x:$(1c).4w(),y:$(1c).4x()};E c=(b.x+(a.x-(x+14))/2);E d=(b.y+(a.y-(y+14))/2);r($.1y.2s||($.1y.6r&&(4z($.1y.2t)<1.9))){y+=4}8.1O.P=M;8.1t(8.q.P.1U(),{\'13\':(8.1u&&c<0)?0:c,\'1d\':(8.1u&&(y+14)>a.y)?b.y:d},\'P\',$.J(C(){8.P=Q},8.1O));8.1t(8.q.V,{\'B\':y-20},\'15\');8.1t(8.q.R.1U(),{\'A\':(x+14),\'B\':y-20},\'15\',{},M);8.1t(8.q.F.G,{\'A\':x,\'B\':y},\'15\');8.1t(8.q.1V,{\'A\':x},\'15\');8.1t(8.q.1V,{\'1d\':(y-4A)/2},\'P\');8.1t(8.q.U.1U(),{\'A\':x,\'B\':y},\'15\',C(){$(8.q.U).38(\'1M\')})}L{8.q.V.I({\'B\':y-20});8.q.R.I({\'A\':x+14,\'B\':y-20});8.q.U.I({\'A\':x,\'B\':y});8.q.F.G.I({\'A\':x,\'B\':y});8.q.1V.I({\'A\':x,\'B\':4A})}},1j:C(a){8.1a=Q;8.X={};r($.1y.2s){8.q.U.1p();8.q.V.1p();8.q.F.1J.1p();8.q.P.I({\'1v\':\'1H\'});8.1W()}L{8.q.P.2q({\'1A\':0,\'1d\':\'-=40\'},{2M:Q,1M:($.J(C(){8.q.U.1p();8.q.V.1p();8.q.F.1J.1p();8.1W();8.q.P.I({\'1v\':\'1H\',\'1A\':1,\'3o\':\'1a\'})},8))})}8.1i.1s($.J(C(){r($.1R(8.1I)){8.1I.3s(8,$.6s(a))}},8));8.q.U.1U(M,Q);8.q.U.2a(\'1M\')},43:C(){8.1a=M;r($.1y.2s){8.q.P.6t(0).26.6u(\'6v\');8.q.F.G.I({\'1r\':\'3P\'}).I({\'1r\':\'2l\'})}8.q.P.I({\'1v\':\'36\',\'3o\':\'1a\'}).Y();8.1i.Y()},22:C(){E x=8.u.22.3z;E d=8.u.22.2O;E t=8.u.22.1B;E o=8.u.22.3A;E l=8.q.P.1r().13;E e=8.q.P;3t(i=0;i<o;i++){e.2q({13:l+x},d,t);e.2q({13:l-x},d,t)};e.2q({13:l+x},d,t);e.2q({13:l},d,t)},2K:C(a){r(a!=8.1D){8.q.R.2n(8.u.D+\'-1D-\'+8.1D);8.1D=a;8.q.R.2o(8.u.D+\'-1D-\'+8.1D)}8.q.P.I({\'3o\':\'1a\'})},2d:C(a){6w(a);8.1j()},45:C(d){E e=/R\\[(.*)?\\]$/i;E f={};r(d.1K(/#/)){d=d.4B(0,d.1Y("#"))}d=d.4B(d.1Y(\'?\')+1).N("&");$.1L(d,C(){E a=8.N("=");E b=a[0];E c=a[1];r(b.1K(e)){r(6x(c)){c=1z(c)}L r(c.4C()=="M"){c=M}L r(c.4C()=="Q"){c=Q}f[b.1K(e)[1]]=c}});O f},3i:C(x,y){E a=$(1c).A()-50;E b=$(1c).B()-50;r(x>a){y=y*(a/x);x=a;r(y>b){x=x*(b/y);y=b}}L r(y>b){x=x*(b/y);y=b;r(x>a){y=y*(a/x);x=a}}O{A:1z(x),B:1z(y)}},2c:C(){8.2K(\'1b\');8.q.U.1p();8.q.V.1p();8.q.U.2o(8.u.D+\'-2c\');8.q.F.G.1s();8.1W(8.u.A,8.u.B);8.15(8.u.A,8.u.B)},3Z:C(){r(8.1u){8.1u=Q;8.q.F.18.2n(8.u.D+\'-19-3f\');8.q.F.18.2o(8.u.D+\'-19-18\');E a=8.3i(8.1b.A,8.1b.B);8.2c();8.q.F.G.Y();8.15(a.A,a.B)}L{8.1u=M;8.q.F.18.2n(8.u.D+\'-19-18\');8.q.F.18.2o(8.u.D+\'-19-3f\');8.2c();8.q.F.G.Y();8.15(8.1b.A,8.1b.B)}}},R:C(a,b,c){r(3l a!==\'1Z\'){O $.2f.Y(a,b,c)}L{O $.2f}}});$.4D.R=C(k,l){O $(8).6y(\'1n\',C(e){e.1S();$(8).6z();E b=[];E c=$.3p($(8).2r(\'2g\'))||\'\';E d=$.3p($(8).2r(\'1X\'))||\'\';r(!c||c==\'\'||c===\'6A\'){b=$(8).2r(\'1w\');3q=(d||d!=\'\')?$.1g({},k,{\'1X\':d}):k}L{E f=[];E g=[];E h=[];E j=Q;$("a[2g="+c+"], 6B[2g="+c+"]").1L($.J(C(i,a){r(8==a){g.6C(a);j=M}L r(j==Q){h.3r(a)}L{g.3r(a)}},8));f=g.6D(h);$.1L(f,C(){E a=$.3p($(8).2r(\'1X\'))||\'\';a=a?"%44%"+a:\'\';b.3r($(8).2r(\'1w\')+a)});r(b.2b==1){b=b[0]}3q=k}$.2f.Y(b,3q,l,8)})};$(C(){r(4z($.4D.3w)>1.2){$.2f.2A()}L{6E"3j 2e 2t 6F 6G 3k 47 6H 6I. 6J 6K 6L 2e 1.3+";}})})(2e);',62,420,'||||||||this||||||||||||||||||esqueleto|if|||options||||||width|height|function|name|var|buttons|div|amp|css|proxy|com|else|true|split|return|move|false|lightbox|id|class|background|html|element|gallery|show|url||index|reg|left||resize|param|http|max|button|visible|image|window|top|iframe|bind|extend|zIndex|overlay|close|shim|span|autoplay|click|current|empty|www|position|hide|morph|maximized|display|href|value|browser|parseInt|opacity|transition|flash|mode|swf|google|border|none|callback|custom|match|each|complete|ajax|animations|prev|next|isFunction|preventDefault|src|stop|navigator|movebox|title|indexOf|undefined||easeOutBack|shake|100|video|maps|style||append|right|unbind|length|loading|error|jQuery|LightBoxObject|rel|embed|vimeo|new|hidden|absolute|total|removeClass|addClass|appendhtml|animate|attr|msie|version|fx|step|modal|showDuration|closeDuration|youtube|create|hideOnClick|target|document|bottom||triggerHandler|isArray|flashvars|replace|changemode|the|queue|isEmptyObject|duration|metacafe|dailymotion|moogaloop|fullscreen|player|megavideo|gametrailers|collegehumor|ustream|twitvid|vzaar||bing|imgsreg|Date|getTime|body|block||trigger||keyCode|images|force|autoresize|urloptions|min|obj|inline|calculate|The|loaded|typeof|autostart|null|overflow|trim|copy_options|push|apply|for|easing|defaults|jquery|400|1000|distance|loops|emergefrom|videoregs|watch|fs|clip_id|show_title|show_byline|show_portrait|color|tv|wordpress|mapsreg|output|inject|static|IF_|frameborder|margin|fadeTo|middle|Previous|Next|999|addevents|maximinimize||create_gallery|custombuttons|open|LIGHTBOX|unserialize|substring|is|videoid|onload|requested|cannot|be|Please|try|again|later|outerWidth|outerHeight|You|need|to|specify|size|of|type|swf2html|object|allowscriptaccess|always|wmode|transparent|scrollLeft|scrollTop|self|parseFloat|90|slice|toLowerCase|fn|arguments|in|prototype|update|call|elem|now|prop|_default|70158|7000|470|280|FFFFFF|200|moveDuration|resizeDuration|showTransition|closeTransition|moveTransition|resizeTransition|640||360|fplayer|playerVars|autoPlay|yes|additionalInfos|autoStart|videoplay|googleplayer|hl|en|docId|server|remote_wrap|php|mid|loc|vid|disabledComment|beginPercent|5331|endPercent|6292|locale|en_US|s0|videopress|guid|01|videos|view|flashplayer|emid|3ede2bc8|227d|8fec|d84a|00b6ff19b1cb|streetview|layer|svembed|jpg|jpeg|gif|png|bmp|tiff|fixed|relative|scrolling|no|insertAfter|Close|init|Maximize|end|scroll|keydown|substr|Image|fadeIn|onerror|clone|abort|GET|cache|dataType|content|success|fullscreenbutton|classid|clsid|D27CDB6E|AE6D|11cf|96B8|444553540000|movie|allowFullScreen|application|shockwave|allowfullscreen|speed|Duration|Transition|curAnim|cur|px|mozilla|makeArray|get|removeAttribute|filter|alert|isFinite|live|blur|nofollow|area|unshift|concat|throw|that|was|too|old|Lightbox|Evolution|requires'.split('|'),0,{}));;

/*
 * jQuery Cycle Plugin (core engine only)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.99 (12-MAR-2011)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.3.2 or later
 */
(function($){var ver="2.99";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){$.fn.cycle.debug&&log(s);}function log(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "));}$.expr[":"].paused=function(el){return el.cyclePause;};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.backwards);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,!opts.backwards);},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,!options.backwards);}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.backwards);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="none"?0:opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length){opts.after[0].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$s.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=0;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing("+fx+"); currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!="none"&&(t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,1);};$.fn.cycle.prev=function(opts){advance(opts,0);};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,moveForward);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v&&v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=="undefined"){opts.cssBefore.opacity=1;}opts.cssBefore.display="block";if(opts.slideResize&&w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(opts.slideResize&&h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,function(){cb();});};$l.animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,autostop:0,autostopCount:0,backwards:false,before:null,cleartype:!$.support.opacity,cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null};})(jQuery);;

