(function (a) { a.fn.sharing = function (b) { this.each(function () { var c = this; a(this).click(function (j) { j.preventDefault(); var g = 200; var f = 450; var d = (screen.height / 2) - (g / 2); var i = (screen.width / 2) - (f / 2); var h = a(c).attr("href"); if (b == "facebook") { window.open("https://www.facebook.com/sharer/sharer.php?u=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } else { if (b == "twitter") { window.open("https://twitter.com/share?url=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } else { if (b == "instagram") { window.open("https://www.instagram.com/share?url=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } else { if (b == "youtube") { window.open("https://www.youtube.com/share?url=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } else { if (b == "pinterest") { window.open("http://www.pinterest.com/pin/create/button/?url=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } else { if (b == "googleplus") { window.open("https://plus.google.com/share?url=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } else { if (b == "linkedin") { window.open("https://www.linkedin.com/cws/share?url=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } else { if (b == "email") { window.open("mailto:?Body=" + h, "sharer", "top=" + d + ",left=" + i + ",toolbar=0,status=0,width=" + f + ",height=" + g) } } } } } } } } }) }) } }(jQuery)); $(document).ready(function () { $(".ss-list a").attr("href", window.location.href); $(".tw-share").sharing("twitter"); $(".fb-share").sharing("facebook"); $(".pt-share").sharing("pinterest"); $(".ln-share").sharing("linkedin"); $(".gp-share").sharing("googleplus"); $(".email-share").sharing("email"); $(".instagram").sharing("instagram"); $(".youtube").sharing("youtube"); });