$(function() {
bindClick();
bindComment();
}
);
function bindClick() {
$('.vote').click(function() {
if($('#vote_img').hasClass('delicious_on')){
return false;
}
$.getJSON($(this).attr('target'),function(json){
$('#vote_img').removeClass('delicious_off');
$('#vote_img').addClass('delicious_on');
$('#vote_animate').addClass('animated').addClass('bounceIn');
$('#voteCnt').removeClass('delicious_off2');
$('#voteCnt').addClass('delicious_on2');
$("#voteCnt").text(json[0].voteCnt);
trackEvent('recipeDelicious','vote','recipeId=11205');
});
//alert("投票しました。\n件数には数分後に反映されます。");
return false;
});
}
function bindComment() {
$('#commentLogin').click(function() {
var URL = '/do/login/thickbox/index'
+ '?path='+ encodeURIComponent('/recipe/11205')
+ '&TB_iframe=true&height=493&keepThis=true&width=540';
tb_show('ログイン',URL,'');
return false;
});
}