/*
 Front Search
 * */

$(function() {
    
    bindResultsMouseover();
    if (typeof queryobj === "object" && queryobj) {
        scrollLoad(queryobj);
    }
    $(".update-ids").click(function(e){
    	var visited_ids = $("#visited_ids").val();
    	if(visited_ids==""){
    		$("#visited_ids").val(parseInt($(this).attr("data-id")));
    	}
    	else{
    		$("#visited_ids").val( visited_ids + "," + $(this).attr("data-id") );
    	}
    });
    
    var visited_ids = $("#visited_ids").val().split(',');
    $.each($(".notice-image"), function(i, e){
    	var im = $(e);
    	var a_par = im.parent();
    	if(visited_ids.indexOf(a_par.attr("data-id"))>=0){
    		im.addClass("visited");
    	}
    });
});