$(document).ready(function(){ $('#nav-link-comments-native').click(function(){ $.cookie('pm_comment_view', 'native', { expires: 180, path: '/' }); }); $('#nav-link-comments-facebook').click(function(){ $.cookie('pm_comment_view', 'facebook', { expires: 180, path: '/' }); FB.XFBML.parse(document.getElementById("comments-facebook")); }); $('#nav-link-comments-disqus').click(function(){ $.cookie('pm_comment_view', 'disqus', { expires: 180, path: '/' }); }); });