﻿$(document).ready(function () {

    $("ul.dropdown li").hover(function () {

        $(this).addClass("hover");
        var options = { direction: "up" };
        $('ul:first', this).show('slide', options);


    }, function () {
        var options = { direction: "up" };
        $('ul:first', this).hide('slide', options);
        $(this).removeClass("hover");

    });

    var cycle = $('.cycle')

    if (cycle.length > 0) {
        var pagerName = "#pager_" + cycle.attr("id");

        cycle.cycle({
            fx: 'scrollHorz',
            speed: 1000,
            timeout: 4000,
            pager: pagerName
        });
    }
});

function ShowMessage(title, body, url) {
    $('#MessageTitle').text(title);
    $("#MessageBody").text(body);
    $('#MessageRedirectUrl').text("OK");
    $('#MessageRedirectUrl').attr("href", url);
    
    $.blockUI({
        message: $('#Message'),
        fadeIn: 700,
        fadeOut: 700,
        timeout: 9000,
        showOverlay: false,
        centerY: false,
        css: {
            width: '450px',
            top: '50px',
            left: '',
            right: '10px',
            border: 'none',
            padding: '10px',
            backgroundColor: '#01ACF1',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .6,
            color: '#fff'
        }
    });
}

function ShowMessage(title, body) {
    $('#MessageTitle').text(title);
    $("#MessageBody").text(body);

    $.blockUI({
        message: $('#Message'),
        fadeIn: 700,
        fadeOut: 700,
        timeout: 9000,
        showOverlay: false,
        centerY: false,
        css: {
            width: '450px',
            top: '50px',
            left: '',
            right: '10px',
            border: 'none',
            padding: '10px',
            backgroundColor: '#01ACF1',
            '-webkit-border-radius': '10px',
            '-moz-border-radius': '10px',
            opacity: .6,
            color: '#fff'
        }
    });
}


