jQuery(document).ready(function(){ jQuery('.viral_tweet_pop').click(function(event) { var width = 575, height = 400, left = (jQuery(window).width() - width) / 2, top = (jQuery(window).height() - height) / 2, url = this.href, opts = 'status=1' + ',width=' + width + ',height=' + height + ',top=' + top + ',left=' + left; window.open(url, 'twitter', opts); return false; }); });