// Place your application-specific JavaScript functions and classes here


$j = jQuery;

$j(document).ready(function(){
    $j("#review_tag_list").each(function(){
        var reviewTagTextArea = this;
        $j(".review-tag-link").click(function(e){
            e.preventDefault();
            $j(reviewTagTextArea).val($j(reviewTagTextArea).val() + "," + $j(this).text());
        })
    })

    console.log("flkjsd")
    $j(".review-tag-checkbox").click(function(e){
        console.log("2")
        console.log(this)

        var filters = [];
        $j(".review-tag-checkbox:checked").each(function(){
            filters.push($j(this).val())
        })

        console.log("*" + filters.join(" ") + "*")
        oTable.fnFilter(filters.join(" "))
    })

})