
$(function(){

    /*$.nyroModalSettings({
        endShowContent: function(elts, settings) {
            elts.bg.animate({opacity: 0.9});
            elts.contentWrapper.css({"margin-top":"0", "top":"0"});
        }
    });

    $('#entries a.feed-modal').nyroModal({
        closeButton: '<a href="#" class="nyroModalClose" id="closeBut" title="close">close X</a>',
        minHeight:600,
        height:650,
        type: 'ajax',
        contentError: "Oooops! Our smartest people have already been notified about this error and will try to fix it shortly.<br><a href=\"#\" class=\"nyroModalClose\">Close</a>"
    });*/

    $('#entries a.feed-details').click(function(){
        var id = $(this).attr("id").match(/[0-9]+/);
        var page = $(this).attr("page");
		
		//Google Analytics track	
		pageTracker._trackPageview('/zoomimage/' + $(this).attr("rel"));
		
        $.ajax({
            beforeSend: function(msg){
                $("#ajax-loader").remove();
                $("<img src=\'/images/ajax-loader.gif\' id=\'ajax-loader\'>").appendTo("#topper-line");
            },
            complete: function(msg){
                $("#ajax-loader").remove();
				window.scroll(0,0);
            },
            dataType: 'script',
            type: "POST",
            url: "/public/feed_detail/index",
            data: "id=" + id + "&page=" + page
        });
        return false;
    });

    $("div.entry-extended").hover(function(){
		$(this).children("div.feed-link").slideToggle("fast");
        $(this).children("div.feed-title").children("a").css("color", "#FFF");
    }, function(){
		$(this).children("div.feed-link").slideToggle();
        $(this).children("div.feed-title").children("a").css("color", "#888");
    });

});