$(document).ready(function(){
                
    $('.eventMoreInfo').hover(
        function(){                       
           $(this).css("background", "url(<?php echo URL?>public/images/icon_set/info2.png) no-repeat center right");
           $(this).css("color", "#B40F16");
        },
        function(){                       
           $(this).css("background", "url(<?php echo URL;?>public/images/icon_set/info2_gray.png) no-repeat center right");
           $(this).css("color", "#212121");
        }
    );

    $('#linkMoreNews a').hover(
        function(){                       
           $(this).css("background", "url(<?php echo URL?>public/images/icon_set/directional_right.png) no-repeat center left");
           $(this).css("color", "#212121");
        },
        function(){                       
           $(this).css("background", "url(<?php echo URL;?>public/images/icon_set/directional_right_gray.png) no-repeat center left");
           $(this).css("color", "#B40F16");
        }
    );
    $("a.moreInfoButton").click(function(e){
        if( e.metaKey == false && e.ctrlKey == false && e.which != 2 ) {
            event.preventDefault();
            var eventID = $(this).parent('div').attr('eventid');
            $.ajax({
                type            : "GET",
                contentType     : "application/json; charset=utf-8",
                url             : '<?php echo URL;?>atburdir/JSONevent/'+eventID,
                data            : "{}",
                dataType        : "json",
                success: function(data) {
                    $.get( '<?php echo URL;?>public/JSONtemplate/eventFancyBox.php', function(template) { 
                            $.fancybox({
                            'width': 400,
                            'minWidth': 400,
                            'height' : 400,
                            'minHeight' : 400,
                            'enableEscapeButton' : false,
                            'overlayShow' : true,
                            'overlayOpacity' : 0,
                            'hideOnOverlayClick' : false,
                            //'content' : $('#templateMoreInfoFancyBox').tmpl(data)
                            'content' : $.tmpl(template, data)
                            });
                    });;
                }
            });
        }
    });
    
});    

$(document).ready(function(){
    
    $(".fancybox").fancybox({
        openEffect	: 'none',
        closeEffect	: 'none'
    });     

});  
