﻿var is_french = (location.href.indexOf("tvrogers") > -1) ? true : false;
// Add This
if (is_french) {
    var addthis_config = {ui_language: "fr"}
}

$(document).ready(function () {
    // Fix issue with IE and flash banners
    if ($.browser.msie)
        $(".banners li embed").parent().addClass("selected");

    // Banners
    $(".banners li a").click(function () {
        $.get("/widget/statistics/ajax_statistics.ashx" + $.query + "&con=banner&typ=c&id=" + $(this).parent().customdata("banner_id"));
    });
    if ($(".banners").length > 0) {
        $(document).everyTime(1000, function (i) {
            var d = new Date();

            $(".banners").each(function (idx) {
                //$("title").text((d.getTime() - $(this).data("last")) / 1000 + " - " + $(this).find(".selected").customdata("duration"));

                //alert($(this).data("last"));
                if (!$(this).data("last"))
                    switch_banner($(this), d);
                else if ((d.getTime() - $(this).data("last")) / 1000 > $(this).find(".selected").customdata("duration"))
                    switch_banner($(this), d);
            });
        });
    }

    // Validation defaults
    if ($.validator != null) {
        $.validator.setDefaults({
            ignoreTitle: true
        });
        $.validator.messages.required = "";
        $.validator.messages.email = "";
    }

    // Playing Tonight
    if ($(".playing.group").length > 0) $(".playing.group").playing_tonight();

    // Upload button
    $("li.upload").click(function () {
        $("#login_popup").data("upload", 1);
        $("#login_popup").trigger('click');

        // If not logged in, don't follow link
        if ($("#login_popup").length > 0) return false;
    });

    // Login popup
    $("#login_popup").fancybox({
        'titleShow': false,
        ajax: {
            type: "GET"
        },
        'transitionIn': 'elastic',
        'transitionOut': 'elastic',
        'speedIn': 500,
        'speedOut': 200,
        'overlayShow': true,
        onComplete: function () {
        }
    });

    // Logout
    $(".logout a").click(function (event) {
        event.preventDefault();
        window.location = "?lid=253&rid=" + $.query.get("rid") + "&log=0";
    });

    // Remove last divider line in mega menu
    $("#navigation .sub ul:last").addClass('last');

    // Mega menu
    $("#navigation ul li.shows").hover(function () {
        $("#navigation ul li.shows .sub").fadeIn("fast");
        $("#navigation ul li.shows a span").css("background-position", "0 -54px");
    }, function () {
        $("#navigation ul li.shows .sub").fadeOut("fast");
        $("#navigation ul li.shows a span").css("background-position", "0 0");
    });

    // Video menu
    $("#navigation ul li.video").hover(function () {
        $("#navigation ul li.video .sub").fadeIn("fast");
        $("#navigation ul li.video a span").css("background-position", (is_french) ? "-128px -54px" : "-90px -54px");
    }, function () {
        $("#navigation ul li.video .sub").hide(0);
        $("#navigation ul li.video a span").css("background-position", (is_french) ? "-128px 0" : "-90px 0");
    });
    $("#navigation ul li.video ul a:eq(0)").click(function () {
        if ($.query.get("lid") == 14) {
            var rodo_pos = $('div[id$="rodo_holder"]').position();
            $('html, body').animate({
                scrollTop: rodo_pos.top-50
            }, 1400, "easeOutQuint");
            return false;
        }
    });
    if (window.location.hash == '#rodo') {
        var rodo_pos = $('div[id$="rodo_holder"]').position();
        $('html, body').animate({
            scrollTop: rodo_pos.top - 50
        }, 1400, "easeOutQuint");
    }    

    // Add This
    if ($.browser.msie && $.browser.version == "6.0")
        $("#addthis").hide();
    else {
        // Facebook Javascript SDK
        window.fbAsyncInit = function () {
            FB.init({ appId: $(".fb_app_id").text(), status: true, cookie: true, xfbml: true });
        };
        (function () {
            var e = document.createElement('script');
            e.type = 'text/javascript';
            e.src = 'https://connect.facebook.net/' + ((is_french) ? 'fr_CA' : 'en_US') + '/all.js';
            e.async = true;
            document.getElementById('fb-root').appendChild(e);
        } ());

        addthis.button("#addthis");
    }

    // Silverlight detection
    try {
        $.cookie("silverlight", (Silverlight.isInstalled("2.0")) ? 1 : 0);
    } catch (e) { }

    // RSS
    if ($(".wdg-rss").length > 0) {
        $.ajax({
            url: '/widget/rss/rss_proxy.ashx?url=' + $(".wdg-rss").attr("data-url"),
            dataType: 'xml',
            success: function (data) {
                $xml = $(data);

                var html = '<div><h5><img alt="' + $xml.find('title:eq(0)').text() + '" src="' + $xml.find('url:eq(0)').text() +
                    '">Blog<br><a href="' + $xml.find('link:eq(0)').text() + '">' + $xml.find('title:eq(0)').text() + '</a></h5><ol>';

                for (var i = 0; i < $xml.find("item").length && i < $(".wdg-rss").attr("data-posts"); i++) {
                    var item = $xml.find('item:eq(' + i + ')');
                    html += '<li><h6><em>' + (new Date(item.find("pubDate").text())).format("mmm dd") + '</em><a href="' + item.find("link").text() + '">' +
                        item.find("title").text() + '</a></h6><p>' + item.find("description").text().substr(0, $(".wdg-rss").attr("data-length")) + ' ...</p></li>'
                }

                html += '</ol><p><a href="' + $xml.find('link:eq(0)').text() + '">Read More</a></p></div>';

                $($(".wdg-rss").attr("data-location")).after($('.wdg-rss'));
                $('.wdg-rss').append(html);
            }
        });
    }

    // Italicize Trade names (exclude TEXTAREA as it causes issues in IE)
    $('body *:not("textarea")').replaceText(/(Rogers TV|Local Matters|TV Rogers|Votre place, votre télé.)/gi, '<i>$1</i>');
});

switch_banner = function(obj, d) {
    // Check to see if there are any banners
    if (obj.find("li").length > 0) {
        obj.data("last", d.getTime());

        var idx = obj.find(".selected").index() + 1;
        idx = (idx < obj.find("li").length) ? idx : 0;

        obj.find(".selected").removeClass("selected");
        obj.find("li:eq(" + idx + ")").addClass("selected");

        $.get("/widget/statistics/ajax_statistics.ashx" + $.query + "&con=banner&typ=i&id=" + obj.find("li:eq(" + idx + ")").customdata("banner_id"));
    }
}

show_loader = function(id) {        
    $(document).ajaxSend(function() {
        $(id).append('<div class="ajax_loader"><img src="/_images/ajax_loader_1.gif" /></div>');
    });
    $(document).ajaxStop(function() {
        $(".ajax_loader").remove();
    });
}

old_jwplayer = function(id, width, height, file) {
    var so = new SWFObject('/_include/jwplayer/player.swf', 'mpl', width, height, '0');
    so.addParam('flashvars', 'stretching=fill&skin=/_include/jwplayer/rtv.zip&file=' + file + '&image=' + file.replace('.flv', '.jpg'));
    so.addParam('allowfullscreen', 'true');
    so.addParam('wmode', 'transparent');
    so.write(id);
}

wmvplayer = function(id, width, height, file) {
    var str = '';
    str += '					<object type="application/x-oleobject" style="width:300px;" id="Player" width="' + width + '" height="' + height + '" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">';
    str += '						<param name="autoStart" value="true"\/>';
    str += '						<param name="stretchToFit" value="1"\/>';
    str += '						<param name="url" value="' + file + '" \/>';
    str += '						<embed type="application/x-ms-wmp" style="width:300px;" name="WMplay" width="' + width + '" height="' + height + '" type="application\/x-mplayer2"';
    str += '							pluginspage="http:\/\/www.microsoft.com\/Windows\/Downloads\/Contents\/Products\/MediaPlayer\/"';
    str += '							src="' + file + '"';
    str += '							ShowControls="1"';
    str += '							wmode="transparent" ';
    str += '							AutoStart="true" \/>';
    str += '					<\/object>';
    $(id).html(str);
}

silverlight_player = function(id, width, height, file) {
    if (Silverlight.isInstalled("1.0")) {
        var elm = document.getElementById(id);
        var src = '/_include/jwplayer/wmvplayer.xaml';
        var cfg = {
            file: file,
            autostart: 'true',
            overstretch: 'fit',
            width: width,
            height: height
        };
        var ply = new jeroenwijering.Player(elm, src, cfg);
    } else {        
        wmvplayer("#"+id, width, height, file);
    }
}

delayed_msg = function (obj, msg) {
    if ($(".delayed-message").length == 0) {
        obj.after("<div class='delayed-message error'>" + msg + "</div>");
        setTimeout(function () {
            $('.delayed-message').fadeOut('slow', function () { $('.delayed-message').remove() });
        }, 2000);
    }
}

// http://plugins.jquery.com/project/Cookie
eval(function(p, a, c, k, e, d) { 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--) { d[e(c)] = k[c] || e(c) } k = [function(e) { return d[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 } ('o.5=B(9,b,2){6(h b!=\'E\'){2=2||{};6(b===n){b=\'\';2.3=-1}4 3=\'\';6(2.3&&(h 2.3==\'j\'||2.3.k)){4 7;6(h 2.3==\'j\'){7=w u();7.t(7.q()+(2.3*r*l*l*x))}m{7=2.3}3=\'; 3=\'+7.k()}4 8=2.8?\'; 8=\'+(2.8):\'\';4 a=2.a?\'; a=\'+(2.a):\'\';4 c=2.c?\'; c\':\'\';d.5=[9,\'=\',C(b),3,8,a,c].y(\'\')}m{4 e=n;6(d.5&&d.5!=\'\'){4 g=d.5.A(\';\');s(4 i=0;i<g.f;i++){4 5=o.z(g[i]);6(5.p(0,9.f+1)==(9+\'=\')){e=D(5.p(9.f+1));v}}}F e}};', 42, 42, '||options|expires|var|cookie|if|date|path|name|domain|value|secure|document|cookieValue|length|cookies|typeof||number|toUTCString|60|else|null|jQuery|substring|getTime|24|for|setTime|Date|break|new|1000|join|trim|split|function|encodeURIComponent|decodeURIComponent|undefined|return'.split('|'), 0, {}))

// http://plugins.jquery.com/project/query-object
eval(function(p, a, c, k, e, d) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; while (c--) { if (k[c]) { p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) } } return p } ('M 6(A){4 $11=A.11||\'&\';4 $V=A.V===r?r:j;4 $1p=A.1p===r?\'\':\'[]\';4 $13=A.13===r?r:j;4 $D=$13?A.D===j?"#":"?":"";4 $15=A.15===r?r:j;v.1o=M 6(){4 f=6(o,t){8 o!=1v&&o!==x&&(!!t?o.1t==t:j)};4 14=6(1m){4 m,1l=/\\[([^[]*)\\]/g,T=/^([^[]+)(\\[.*\\])?$/.1r(1m),k=T[1],e=[];19(m=1l.1r(T[2]))e.u(m[1]);8[k,e]};4 w=6(3,e,7){4 o,y=e.1b();b(I 3!=\'X\')3=x;b(y===""){b(!3)3=[];b(f(3,L)){3.u(e.h==0?7:w(x,e.z(0),7))}n b(f(3,1a)){4 i=0;19(3[i++]!=x);3[--i]=e.h==0?7:w(3[i],e.z(0),7)}n{3=[];3.u(e.h==0?7:w(x,e.z(0),7))}}n b(y&&y.T(/^\\s*[0-9]+\\s*$/)){4 H=1c(y,10);b(!3)3=[];3[H]=e.h==0?7:w(3[H],e.z(0),7)}n b(y){4 H=y.B(/^\\s*|\\s*$/g,"");b(!3)3={};b(f(3,L)){4 18={};1w(4 i=0;i<3.h;++i){18[i]=3[i]}3=18}3[H]=e.h==0?7:w(3[H],e.z(0),7)}n{8 7}8 3};4 C=6(a){4 p=d;p.l={};b(a.C){v.J(a.Z(),6(5,c){p.O(5,c)})}n{v.J(1u,6(){4 q=""+d;q=q.B(/^[?#]/,\'\');q=q.B(/[;&]$/,\'\');b($V)q=q.B(/[+]/g,\' \');v.J(q.Y(/[&;]/),6(){4 5=1e(d.Y(\'=\')[0]||"");4 c=1e(d.Y(\'=\')[1]||"");b(!5)8;b($15){b(/^[+-]?[0-9]+\\.[0-9]*$/.1d(c))c=1A(c);n b(/^[+-]?[0-9]+$/.1d(c))c=1c(c,10)}c=(!c&&c!==0)?j:c;b(c!==r&&c!==j&&I c!=\'1g\')c=c;p.O(5,c)})})}8 p};C.1H={C:j,1G:6(5,1f){4 7=d.Z(5);8 f(7,1f)},1h:6(5){b(!f(5))8 d.l;4 K=14(5),k=K[0],e=K[1];4 3=d.l[k];19(3!=x&&e.h!=0){3=3[e.1b()]}8 I 3==\'1g\'?3:3||""},Z:6(5){4 3=d.1h(5);b(f(3,1a))8 v.1E(j,{},3);n b(f(3,L))8 3.z(0);8 3},O:6(5,c){4 7=!f(c)?x:c;4 K=14(5),k=K[0],e=K[1];4 3=d.l[k];d.l[k]=w(3,e.z(0),7);8 d},w:6(5,c){8 d.N().O(5,c)},1s:6(5){8 d.O(5,x).17()},1z:6(5){8 d.N().1s(5)},1j:6(){4 p=d;v.J(p.l,6(5,7){1y p.l[5]});8 p},1F:6(Q){4 D=Q.B(/^.*?[#](.+?)(?:\\?.+)?$/,"$1");4 S=Q.B(/^.*?[?](.+?)(?:#.+)?$/,"$1");8 M C(Q.h==S.h?\'\':S,Q.h==D.h?\'\':D)},1x:6(){8 d.N().1j()},N:6(){8 M C(d)},17:6(){6 F(G){4 R=I G=="X"?f(G,L)?[]:{}:G;b(I G==\'X\'){6 1k(o,5,7){b(f(o,L))o.u(7);n o[5]=7}v.J(G,6(5,7){b(!f(7))8 j;1k(R,5,F(7))})}8 R}d.l=F(d.l);8 d},1B:6(){8 d.N().17()},1D:6(){4 i=0,U=[],W=[],p=d;4 16=6(E){E=E+"";b($V)E=E.B(/ /g,"+");8 1C(E)};4 1n=6(1i,5,7){b(!f(7)||7===r)8;4 o=[16(5)];b(7!==j){o.u("=");o.u(16(7))}1i.u(o.P(""))};4 F=6(R,k){4 12=6(5){8!k||k==""?[5].P(""):[k,"[",5,"]"].P("")};v.J(R,6(5,7){b(I 7==\'X\')F(7,12(5));n 1n(W,12(5),7)})};F(d.l);b(W.h>0)U.u($D);U.u(W.P($11));8 U.P("")}};8 M C(1q.S,1q.D)}}(v.1o||{});', 62, 106, '|||target|var|key|function|value|return|||if|val|this|tokens|is||length||true|base|keys||else||self||false|||push|jQuery|set|null|token|slice|settings|replace|queryObject|hash|str|build|orig|index|typeof|each|parsed|Array|new|copy|SET|join|url|obj|search|match|queryString|spaces|chunks|object|split|get||separator|newKey|prefix|parse|numbers|encode|COMPACT|temp|while|Object|shift|parseInt|test|decodeURIComponent|type|number|GET|arr|EMPTY|add|rx|path|addFields|query|suffix|location|exec|REMOVE|constructor|arguments|undefined|for|empty|delete|remove|parseFloat|compact|encodeURIComponent|toString|extend|load|has|prototype'.split('|')))

// Email decryption
function email(enc_str) { var str = ""; for (i = 0; i < enc_str.length; i++) { str += String.fromCharCode(129 ^ enc_str.charCodeAt(i)) } location.href = str }

// http://blog.stevenlevithan.com/archives/date-time-format
eval(function(p, a, c, k, e, d) { 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--) { d[e(c)] = k[c] || e(c) } k = [function(e) { return d[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 } ('J q=x(){J 16=/d{1,4}|m{1,4}|G(?:G)?|([2h])\\1?|[2s]|"[^"]*"|\'[^\']*\'/g,14=/\\b(?:[23][2e]T|(?:2L|2R|2P|2v|2A) (?:2C|2D|22) 1i|(?:1h|z)(?:[-+]\\d{4})?)\\b/g,13=/[^-+\\1j-Z]/g,8=x(k,K){k=u(k);K=K||2;1k(k.R<K)k="0"+k;n k};n x(5,6,j){J f=q;W(1x.R==1&&21.1c.1T.1S(5)=="[1R u]"&&!/\\d/.1V(5)){6=5;5=1U}5=5?Y I(5):Y I;W(1K(5))1L 1M("1N 5");6=u(f.X[6]||6||f.X["17"]);W(6.E(0,4)=="z:"){6=6.E(4);j=1I}J 9=j?"1D":"1F",d=5[9+"I"](),D=5[9+"1G"](),m=5[9+"1H"](),y=5[9+"1O"](),H=5[9+"1P"](),M=5[9+"1X"](),s=5[9+"1Y"](),L=5[9+"20"](),o=j?0:5.1W(),V={d:d,v:8(d),19:f.w.U[D],18:f.w.U[D+7],m:m+1,C:8(m+1),N:f.w.Q[m],O:f.w.Q[m+12],G:u(y).E(2),e:y,h:H%12||12,1C:8(H%12||12),H:H,r:8(H),M:M,c:8(M),s:s,i:8(s),l:8(L,3),L:8(L>1l?F.1m(L/10):L),t:H<12?"a":"p",1f:H<12?"1e":"1g",T:H<12?"A":"P",B:H<12?"1B":"1q",Z:j?"z":(u(5).1A(14)||[""]).1v().1a(13,""),o:(o>0?"-":"+")+8(F.1s(F.11(o)/15)*1b+F.11(o)%15,4),S:["2E","2F","2G","2B"][d%10>3?0:(d%1b-d%10!=10)*d%10]};n 6.1a(16,x($0){n $0 2z V?V[$0]:$0.E(1,$0.R-1)})}}();q.X={"17":"19 N v e r:c:i",2K:"m/d/G",2u:"N d, e",2b:"O d, e",2a:"18, O d, e",29:"h:c B",28:"h:c:i B",24:"h:c:i B Z",26:"e-C-v",27:"r:c:i",2f:"e-C-v\'T\'r:c:i",2g:"z:e-C-v\'T\'r:c:i\'Z\'"};q.w={U:["2l","1o","2k","2j","2i","2m","2n","2r","2q","2o","2p","25","2d","2c"],Q:["2t","2M","2J","2N","1d","2O","2Q","2I","2H","2y","2x","2w","2S","1u","1t","1r","1d","1w","1z","1y","1Q","1Z","1E","1J"]};I.1c.1p=x(6,j){n q(1n,6,j)};', 62, 179, '|||||date|mask||pad|_|||MM||yyyy|dF|||ss|utc|val|||return|||dateFormat|HH|||String|dd|i18n|function||UTC||TT|mm||slice|Math|yy||Date|var|len|||mmm|mmmm||monthNames|length|||dayNames|flags|if|masks|new|||abs||timezoneClip|timezone|60|token|default|dddd|ddd|replace|100|prototype|May|am|tt|pm|GMT|Time|dA|while|99|round|this|Mon|format|PM|April|floor|March|February|pop|June|arguments|August|July|match|AM|hh|getUTC|November|get|Day|Month|true|December|isNaN|throw|SyntaxError|invalid|FullYear|Hours|September|object|call|toString|undefined|test|getTimezoneOffset|Minutes|Seconds|October|Milliseconds|Object|Prevailing|PMCEA|longTime|Thursday|isoDate|isoTime|mediumTime|shortTime|fullDate|longDate|Saturday|Friday|SDP|isoDateTime|isoUtcDateTime|HhMsTt|Thu|Wed|Tue|Sun|Fri|Sat|Tuesday|Wednesday|Monday|Sunday|LloSZ|Jan|mediumDate|Eastern|Dec|Nov|Oct|in|Atlantic|rd|Standard|Daylight|th|st|nd|Sep|Aug|Mar|shortDate|Pacific|Feb|Apr|Jun|Central|Jul|Mountain|January'.split('|'), 0, {}))

// http://plugins.jquery.com/project/timers
eval(function(p, a, c, k, e, d) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; while (c--) { if (k[c]) { p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) } } return p } ('5.4.C({W:c(b,3,4,a){h 8.n(c(){5.f.t(8,b,3,4,a)})},V:c(b,3,4){h 8.n(c(){5.f.t(8,b,3,4,1)})},U:c(3,4){h 8.n(c(){5.f.l(8,3,4)})}});5.C({f:{y:[],L:1,k:"5.f",B:/^([0-9]+(?:\\.[0-9]*)?)\\s*(.*s)?$/,D:{\'Y\':1,\'11\':10,\'T\':12,\'s\':R,\'N\':O,\'S\':P,\'Q\':Z},H:c(j){7(j==14||j==z)h z;g o=8.B.1b(5.1c(j.1d()));7(o[2]){g G=1e(o[1]);g E=8.D[o[2]]||1;h G*E}x{h j}},t:c(d,b,3,4,a){g v=0;7(5.19(3)){7(!a)a=4;4=3;3=b}b=5.f.H(b);7(I b!=\'A\'||F(b)||b<0)h;7(I a!=\'A\'||F(a)||a<0)a=0;a=a||0;g 6=5.r(d,8.k)||5.r(d,8.k,{});7(!6[3])6[3]={};4.e=4.e||8.L++;g u=c(){7((++v>a&&a!==0)||4.15(d,v)===17)5.f.l(d,3,4)};u.e=4.e;7(!6[3][4.e])6[3][4.e]=q.1f(u,b);8.y.18(d)},l:c(d,3,4){g 6=5.r(d,8.k),i;7(6){7(!3){m(3 p 6)8.l(d,3,4)}x 7(6[3]){7(4){7(4.e){q.J(6[3][4.e]);w 6[3][4.e]}}x{m(g 4 p 6[3]){q.J(6[3][4]);w 6[3][4]}}m(i p 6[3])K;7(!i){i=z;w 6[3]}}m(i p 6)K;7(!i)5.1a(d,8.k)}}}});5(q).13("X",c(){5.n(5.f.y,c(16,M){5.f.l(M)})});', 62, 78, '|||label|fn|jQuery|timers|if|this||times|interval|function|element|timerID|timer|var|return|ret|value|dataKey|remove|for|each|result|in|window|data||add|handler|counter|delete|else|global|null|number|regex|extend|powers|mult|isNaN|num|timeParse|typeof|clearInterval|break|guid|item|das|10000|100000|ks|1000|hs|ds|stopTime|oneTime|everyTime|unload|ms|1000000||cs|100|bind|undefined|call|index|false|push|isFunction|removeData|exec|trim|toString|parseFloat|setInterval'.split('|')))

// jQuery Plugin for Extracting HTML5 Custom Data Attributes
// http://github.com/ubilabs/jquery-customdata
eval(function(p, a, c, k, e, d) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; while (c--) { if (k[c]) { p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) } } return p } ('(9($,A){5 e=/^4\\-(.+)$/;5 p=9(j){5 7=j.B(\'-\'),h=7.s;a(h==1){6 7[0]}5 m=j.k(0)==\'-\'?7[0].k(0).q()+7[0].o(1):7[0];v(5 i=1;i<h;i++){m+=7[i].k(0).q()+7[i].o(1)}6 m};5 c=9(2){5 4={};a(2&&2.u===1){$.D(2.c,9(n,d){a(e.t(d.f)){5 8=d.f.C(e)[1];4[p(8)]=d.I}})}6 4};$.F({b:9(2,8){5 4=$(2).4("b");a(!4){4=c(2);$(2).4("b",4)}6 8?4[8]:4}});$.G.b=9(8){6 $.b(H[0],8)};$.x[\':\'].b=9(2,n,r){5 g=r[3];a(g){6 $(2).w("[4-"+g+"]")}a(2&&2.u===1&&2.c){v(5 i=0,l=2.c.s;i<l;i++){a(e.t(2.c[i].f)){6 y}}}6 z}})(E);', 45, 45, '||elem||data|var|return|parts|key|function|if|customdata|attributes|attr|RE_DATA|nodeName|argument|len||string|charAt||camelized|index|substring|camelize|toUpperCase|properties|length|test|nodeType|for|is|expr|true|false|undefined|split|match|each|jQuery|extend|fn|this|nodeValue'.split('|')))

// http://benalman.com/projects/jquery-replacetext-plugin/
$.fn.replaceText=function(a,b,c){return this.each(function(){var d=this.firstChild,e,f,g=[];if(d){do{if(d.nodeType===3){e=d.nodeValue;f=e.replace(a,b);if(f!==e){if(!c&&/</.test(f)){$(d).before(f);g.push(d)}else{d.nodeValue=f}}}}while(d=d.nextSibling)}g.length&&$(g).remove()})}
