$(function () {
    
    //$.fn.colorbox.settings.bgOpacity = "0.7";
    //$("#story-box a").each(function() {
    //	var elem = $(this);
    //	var currHref = elem.attr("href");
    //	elem.attr("href", currHref+"?xhr");
    //});
    //$("#story-box a").colorbox({fixedWidth:850, fixedHeight:"80%"});

    $(function () {
	    $("img.story-image").mouseover(function () {
		    elem = $(this);
		    var src = elem.attr("src");
		    elem.attr("src", src.replace("_bw", ""));
		});
	    $("img.story-image").mouseout(function () {
		    elem = $(this);
		    var src = elem.attr("src");
		    elem.attr("src", src.replace("crop", "bw_crop"));
		});
	});

    var curLoc = String(window.location);
    var anchors = curLoc.split('#');
    if(anchors.length > 1) {
	var story = anchors[1];
	$("#img-"+story).parent().click();
    }
});
