$(document).ready(function(){
    $("a[rel^='echoeslightbox']").colorbox({
        transition:'elastic',
        slideshowSpeed:9000,
        slideshowAuto:false,
        slideshow:true
    });
    $(".lboxvideo").colorbox({
        iframe:true,
        innerWidth:425,
        innerHeight:344
    });
});

$.extend({
    overlay: function(options){
        var defaults = { 
            show: null,
            color: '#3D3D3D',
            onBeforeClose: null,
            onClose: null,
            closeOnClick: true,
            closeOnEsc: true
        }; 
        options = $.extend({}, defaults, options);
        
        if(options.show === null){
            if($('#overlay').hasClass('hide')) {
                options.show = true;
            } else {
                options.show = false;
            }
        }

        if(options.show == true) {
            $('#overlay').removeClass('hide');
            $('#overlay').expose({
                color: options.color,
                closeOnClick: options.closeOnClick,
                closeOnEsc: options.closeOnEsc,
                onBeforeClose: options.onBeforeClose,
                onClose: options.onClose
            });
        } else {
            $('#overlay').addClass('hide');
            $.mask.close();
        }

    }
})
ddsmoothmenu.init({
    mainmenuid: "smoothmenu1", //menu DIV id
    orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
    classname: 'ddsmoothmenu', //class added to menu's outer DIV
    //customtheme: ["#1c5a80", "#18374a"],
    contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
});

