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 } ('h.i[\'E\']=h.i[\'y\'];h.F(h.i,{z:\'A\',y:9(x,t,b,c,d){6 h.i[h.i.z](x,t,b,c,d)},G:9(x,t,b,c,d){6 c*(t/=d)*t+b},A:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},H:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},I:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},K:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},L:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},N:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},O:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},P:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},R:9(x,t,b,c,d){6-c*8.B(t/d*(8.g/2))+c+b},S:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},T:9(x,t,b,c,d){6-c/2*(8.B(8.g*t/d)-1)+b},U:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},V:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/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(x,t,b,c,d){6 c-h.i.w(x,d-t,0,c,d)+b},w:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.17/2.k))*t+.18)+b}m{6 c*(7.q*(t-=(2.19/2.k))*t+.1a)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.D(x,t*2,0,c,d)*.5+b;6 h.i.w(x,t*2-d,0,c,d)*.5+c*.5+b}});', 62, 74, '||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|abs|||asin|undefined|easeOutBounce||swing|def|easeOutQuad|cos|525|easeInBounce|jswing|extend|easeInQuad|easeInOutQuad|easeInCubic|easeOutCubic|easeInOutCubic|easeInQuart|easeOutQuart|easeInOutQuart|easeInQuint|easeOutQuint|easeInOutQuint|easeInSine|easeOutSine|easeInOutSine|easeInExpo|easeOutExpo|easeInOutExpo|easeInCirc|easeOutCirc|easeInOutCirc||easeInElastic|easeOutElastic|easeInOutElastic|easeInBack|easeOutBack|easeInOutBack|25|9375|625|984375|easeInOutBounce'.split('|'), 0, {}));
eval(function (p, a, c, k, e, r) { e = function (c) { return (c < 62 ? '' : e(parseInt(c / 62))) + ((c = c % 62) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e } ]; e = function () { return '([3-9A-Z]|1\\w)' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('(3(g){g.fn.jCarouselLite=3(a){a=g.extend({A:8,B:8,O:8,U:C,H:8,I:200,V:8,D:C,E:W,J:1,F:0,5:1,P:8,Q:8},a||{});6 K.X(3(){9 o=C,p=a.D?"Y":"G",s=a.D?"R":"S";9 n=g(K),h=g("ul.carousel",n),r=g("Z.10",h),v=r.11(),c=a.J;4(a.E){h.prepend(r.L(v-c-1+1).12()).append(r.L(0,c).12());a.F+=c}9 j=g("Z.10",h),k=j.11(),f=a.F;n.7("visibility","J");j.7({13:"14",float:a.D?"15":"G"});h.7({margin:"0",padding:"0",16:"17","list-style-type":"15","z-18":"1"});n.7({13:"14",16:"17","z-18":"2",G:"0px"});9 l=a.D?w(j):x(j);9 y=l*k;9 z=l*c;j.7({S:j.S(),R:j.R()});h.7(s,y+"M").7(p,-(f*l));n.7(s,z+"M");4(a.A)g(a.A).T(3(){6 m(f-a.5)});4(a.B)g(a.B).T(3(){6 m(f+a.5)});4(a.O)g.X(a.O,3(i,19){g(19).T(3(){6 m(a.E?a.J+i:i)})});4(a.U&&n.1a)n.1a(3(e,d){6 d>0?m(f-a.5):m(f+a.5)});4(a.H){9 t=1b(3(){m(f-a.5)},a.H-a.I);g(".featureditem").hover(3(){clearInterval(t)},3(){t=1b(3(){m(f-a.5)},a.H-a.I)})}3 u(){6 j.L(f).L(0,c)};3 m(b){4(!o){4(a.P)a.P.1c(K,u());4(a.E){4(b<=a.F-c-1){h.7(p,-((k-(c*2))*l)+"M");f=b==a.F-c-1?k-(c*2)-1:k-(c*2)-a.5}N 4(b>=k-c+1){h.7(p,-((c)*l)+"M");f=b==k-c+1?c+1:c+a.5}N f=b}N{4(b<0||b>k-c)6;N f=b}o=W;h.animate(p=="G"?{G:-(f*l)}:{Y:-(f*l)},a.I,a.V,3(){4(a.Q)a.Q.1c(K,u());o=C});4(!a.E){g(a.A+","+a.B).removeClass("1d");g((f-a.5<0&&a.A)||(f+a.5>k-c&&a.B)||[]).addClass("1d")}}6 C}})};3 q(b,o){6 parseInt(g.7(b[0],o))||0};3 x(b){6 b[0].offsetWidth+q(b,\'marginLeft\')+q(b,\'marginRight\')};3 w(b){6 b[0].offsetHeight+q(b,\'marginTop\')+q(b,\'marginBottom\')}})(jQuery);', [], 76, '|||function|if|scroll|return|css|null|var|||||||||||||||||||||||||||btnPrev|btnNext|false|vertical|circular|start|left|auto|speed|visible|this|slice|px|else|btnGo|beforeStart|afterEnd|height|width|click|mouseWheel|easing|true|each|top|li|carouselitem|size|clone|overflow|hidden|none|position|relative|index|val|mousewheel|setInterval|call|disabled'.split('|'), 0, {}))

var title = "";
var directoryResourceTitle = "";
var description = "";
var articleURL = "";
var imageDescription = "";
var imageHTML = "";
var paymentMethods = "";
var linkDDL = "";
var linkFlash = "";
var osMan = "";
var isUSRestricted = false;
var articleID = "";
var osManItems = new Array(0);
var FlashObjects = new Array(0);

InjectOsMan();
ApplyTabsFormatting();
$(".featureditem").each(function () { $(this).css("display", "block"); });

$(document).ready(function () {
    ActivateFlashObjectsFeatured();
});

function ActivateFlashObjectsFeatured() {

    //Get flash content here ..
    $(".flimg").each(function () {
        try {
            var fo = new SWFObject($(this).attr("fl"), "movie_player", $(this).attr("w"), $(this).attr("h"), 7, "#FFFFFF");
            fo.addParam("wmode", "transparent");
            fo.write($(this).attr("id"));
            $(this).parent().html($("#" + $(this).attr("id")).html());
        } catch (e) { }
    });

}

function InjectOsMan() {
    var t = "";
    t += '<div id="davis">';
    t += '<strong><a href="/os-man-corner/" class="os-corner-title">More Casino News & Promotions</a></strong>';
    t += '<div id="osc">';
    t += '.. items here';
    t += '</div>';
    t += '</div>';
    t += '<div class="fm"></div>';
    $("#corner").html(t);
}

function ApplyTabsFormatting() {

    var a = 0;

    var totalFeaturedItems = $(".featureditem").length;

    osManItems = new Array(totalFeaturedItems);

    $(".featureditem").each(function () {

        $(this).find("h2").addClass("fpat");

        articleID = $(this).attr("id").replace("f", "");
        title = $(this).find("h2").html();
        articleURL = $(this).find("h2").find("a").attr("href");
        description = $(this).find("strong").html();

        var usRestricted = $(this).attr("nus");
        if (usRestricted != null) {
            if (usRestricted == "1") {
                isUSRestricted = true;
            } else {
                isUSRestricted = false;
            }
        } else {
            isUSRestricted = false;
        }

        try { osMan = $(this).find("ul").html(); } catch (e) { }
        try { directoryResourceTitle = $(this).attr("drt"); } catch (e) { }
        try { linkDDL = $(this).attr("ddl"); } catch (e) { }
        try { linkFlash = $(this).attr("fl"); } catch (e) { }

        var imageDiv = $(this).find("div.fii");

        if ($(imageDiv).find(".flimg").length < 1) { imageHTML = $(imageDiv).html(); } else {
            imageHTML = $(imageDiv).html();
        }

        if (osMan != null) {
            $("#corner").parent().append('<div style="display:none;" id="osmanItem' + a + '">' + osMan + '</div>');
        } else {
            $("#corner").parent().append('<div style="display:none;" id="osmanItem' + a + '">' + GetOsManSubstitutionText() + '</div>');
        }

        imageDescription = $(imageDiv).attr("imd");
        paymentMethods = $(this).attr("pm");

        $(this).html(GetFormattedTemplate());

        //Remove image border
        $("table.fa_mc").find("td").find("img").css("border", "0");

        $(this).wrap('<li class="carouselitem" id="' + a + '"></li>');

        a++;


    });

    var totalContent = $("#pgtab").html();
    $("#pgtab").html('<ul class="carousel" style="padding:0;margin:0;list-style-type:none">' + totalContent + '</ul>');

    getOsmanItem(0);

    $("#pgtab").jCarouselLite({ btnNext: ".btnPrev", btnPrev: ".btnNext", visible: 1, speed: 500, auto: 35000, easing: "easeInCubic",
        afterEnd: function (a) { getOsmanItem(a); }
    });

}

function GetOsManSubstitutionText() {
    var t = 'All about video games, betting, slots and online casino gambling.<br /><br />';
    t += '<ul><li><a href="/os-man-corner/">Browse the Articles</a></li></ul>';
    return t;
}

function getOsmanItem(index) {

    var myIndex = eval($(index).attr("id"));
    if (myIndex == null) myIndex = 0;

    $("#osc").html("<ul>" + $("#osmanItem" + myIndex).html() + "</ul>");

};

function GetFormattedTemplate() {
    var t = "";
    
    //t += '<table width="750" border="0" cellspacing="0" cellpadding="0" style="position:relative;top:-10px;height:300px;background:url(/images/';
    //if (isUSRestricted) { t += 'nus.png'; } else { t += 'aus.png'; }
    //t += ') no-repeat right;">';
    t += '<table width="750" border="0" cellspacing="0" cellpadding="0" style="position:relative;top:-10px;height:300px;">';
    t += '<tr><td align="left" valign="top" class="fa_al"><h2 class="fpat">' + title + "</h2>";
    t += '<table align="left" style="margin-right:6px;height:255px;"><tr><td style="height:190px;" valign="middle" class="featured-item-image" align="center"><a href="' + articleURL + '">' + imageHTML + '</a></td>';
    t += '</tr><tr><td width="200" valign="middle" align="center"><div align="center">';
    if ((imageDescription != "") && (imageDescription != null)) { t += '<a href="' + articleURL + '">' + imageDescription + '</a>'; }
    t += '</div></td></tr>';
    t += '<tr><td width="220" valign="bottom"><div class="fa_pp"><a style="cursor:pointer;" rel="previous"  class="btnPrev"><img src="/images/btnp.png" width="84" height="21" border="0" /></a></div>';
    t += '<div class="fa_np"><a style="cursor:pointer;" rel="next" class="btnNext"><img src="/images/btnn.png" width="59" height="21" border="0" /></a></div>';
    t += '</td></tr></table>';
    t += '<table border="0" cellpadding="0" cellspacing="0">';
    t += '<tr><td style="height:202px;padding-left:15px;" valign="middle">';
    t += '<div class="fad">' + description + ' &nbsp;<a href="' + articleURL + '">Read more &raquo;</a></div>';
    t += '<br /><br />';
    t += GetLinks();
    t += '</td></tr></table><br /><table width="380" border="0" cellspacing="0" cellpadding="5" align="left">';
    //t += '<tr><td align="center">' + GetPaymentMethodsHTML() + '</td>';
    t += '<tr><td align="center"> &nbsp; Something here </td>';
    t += '</tr></table></td></tr></table>';
    return t;
}

function GetPaymentMethodsHTML() { var result = ""; if ((paymentMethods != "") && (paymentMethods != null)) { var pm = paymentMethods.split(','); for (i = 0; i < pm.length; i++) { result += '<img src="/images/pay/' + pm[i] + '.jpg" align="absmiddle" />'; if (i < pm.length - 1) result += "&nbsp; &nbsp; &nbsp; "; } } return result; }
function GetLinks() {
    var links = ""; links += '<a class="favl" target="_blank" href="/alink/' + articleID + '">Visit ';
    if (directoryResourceTitle != "") { links += directoryResourceTitle; } else { links += ' this Casino'; } links += "</a>";
    if (linkDDL != "") { links += '<a class="faddl" target="_blank" href="/direct-download/' + linkDDL + '">Download Now</a>'; }
    if ((linkFlash != "") && (linkFlash != null)) { links += '<a class="fafl" target="_blank" href="/flash-game/' + linkFlash + '">Instant Play</a>'; } return links;
}