$(document).ready(function () {
   var url = window.location.host;
   
   $('.social').html('<div style="width:600px; height:55px; padding:5px; margin:10px; float:right; border:1px solid #008080; background-color:#EFEFEF; font-family:Helvetica, Arial, sans-serif; font-size:14px;"><div class="sociallinks" style="height:25px; border-bottom:1px dotted #008080;margin-bottom:5px;color:#008080;">Social Links &raquo;  <a href="#" class="print" style="color:#008080; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 0 no-repeat;"></span>Drucken</a> <a href="mailto:?subject=Empfehlung%20eines%20Freundes&body=Hallo,%0A%0Aich%20habe%20beim%20Recherchieren%20diese%20Webseite%20entdeckt.%0ADiese%20wird%20Dir%20bestimmt%20gefallen%20-%20inhaltlich%20sehr%20gut.%0ALink:%20'+window.location+'%0A%0AViele%20Gr&uuml;&szlig;e" class="send" style="color:#008080; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -20px no-repeat;"></span>Senden</a> <a href="mailto:info@lohn-info.de?subject=Feedback%20Information" class="feedback" style="color:#008080; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -40px no-repeat;"></span>Feedback</a> <a href="#" class="bookmark" style="color:#008080; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -60px no-repeat;"></span>Merken</a></div><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-lang="de">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2F'+url+'&amp;layout=standard&amp;show_faces=false&amp;width=390&amp;action=like&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" style="position:absolute; border:none; overflow:hidden; width:390px; height:35px;" allowTransparency="true"></iframe><a href="http://www.mister-wong.de/add_url/?bm_url='+url+'" target="_blank" style="float:right; margin-right:10px;"><span style="width:20px; height:20px; display:block; background:url(/social/img/socialslice.png) 0 -100px no-repeat;"></span></a><a href="https://www.xing.com/app/user?op=share;url='+url+'" target="_blank" style="float:right; margin-right:10px;"><span style="width:20px; height:20px; display:block; background:url(/social/img/socialslice.png) 0 -120px no-repeat;"></span></a><a href="http://www.studivz.net/Link/ExternLink/Url/?u='+url+'&amp;desc=&amp;prov=" target="_blank" style="float:right; margin-right:10px;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -80px no-repeat;"></span></a></div><div style="float:none;clear:both;"></div>');
   
   $('.social2').html('<div style="width:600px; height:55px; padding:5px; margin:10px; float:right; border:1px solid #fe8081; background-color:#fff2f2; font-family:Helvetica, Arial, sans-serif; font-size:14px;"><div class="sociallinks" style="height:25px; border-bottom:1px dotted #fe8081;margin-bottom:5px;color:#fe8081;">Social Links &raquo;  <a href="#" class="print" style="color:#fe8081; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 0 no-repeat;"></span>Drucken</a> <a href="mailto:?subject=Empfehlung%20eines%20Freundes&body=Hallo,%0A%0Aich%20habe%20beim%20Recherchieren%20diese%20Webseite%20entdeckt.%0ADiese%20wird%20Dir%20bestimmt%20gefallen%20-%20inhaltlich%20sehr%20gut.%0ALink:%20'+window.location+'%0A%0AViele%20Gr&uuml;&szlig;e" class="send" style="color:#fe8081; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -20px no-repeat;"></span>Senden</a> <a href="mailto:kontakt@rechnungswesen-info.de?subject=Feedback%20Information" class="feedback" style="color:#fe8081; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -40px no-repeat;"></span>Feedback</a> <a href="#" class="bookmark" style="color:#fe8081; text-decoration:none;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -60px no-repeat;"></span>Merken</a></div><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-lang="de">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2F'+url+'&amp;layout=standard&amp;show_faces=false&amp;width=390&amp;action=like&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" style="position:absolute; border:none; overflow:hidden; width:390px; height:35px;" allowTransparency="true"></iframe><a href="http://www.mister-wong.de/add_url/?bm_url='+url+'" target="_blank" style="float:right; margin-right:10px;"><span style="width:20px; height:20px; display:block; background:url(/social/img/socialslice.png) 0 -100px no-repeat;"></span></a><a href="https://www.xing.com/app/user?op=share;url='+url+'" target="_blank" style="float:right; margin-right:10px;"><span style="width:20px; height:20px; display:block; background:url(/social/img/socialslice.png) 0 -120px no-repeat;"></span></a><a href="http://www.studivz.net/Link/ExternLink/Url/?u='+url+'&amp;desc=&amp;prov=" target="_blank" style="float:right; margin-right:10px;"><span style="width:20px; height:20px; display:inline-block; background:url(/social/img/socialslice.png) 0 -80px no-repeat;"></span></a></div><div style="float:none;clear:both;"></div>');
	$('.print').click(function(){
		window.print();
		return false;
   });
   $('.bookmark').click(function(){
		return BookmarkApp.addBookmark(this);
   });
   
   
});
BookmarkApp = function (title,url) {

    var isIEmac = false; 
    var isMSIE = (-[1,]) ? false : true;
    var cjTitle = window.location.host;
    var cjHref = window.location;

    function hotKeys() {
        var ua = navigator.userAgent.toLowerCase();
        var str = '';
        var isWebkit = (ua.indexOf('webkit') != - 1);
        var isMac = (ua.indexOf('mac') != - 1);

        if (ua.indexOf('konqueror') != - 1) {
            str = 'CTRL + B'; // Konqueror
        } else if (window.home || isWebkit || isIEmac || isMac) {
            str = (isMac ? 'Command/Cmd' : 'Strg') + ' + D'; // Netscape, Safari, iCab, IE5/Mac
        }
        return ((str) ? ' ' + str + ' um diese Seite zu speichern.' : str);
    }

    function isIE8() {
        var rv = -1;
        if (navigator.appName == 'Microsoft Internet Explorer') {
            var ua = navigator.userAgent;
            var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
            if (re.exec(ua) != null) {
                rv = parseFloat(RegExp.$1);
            }
        }
        if (rv > - 1) {
            if (rv >= 8.0) {
                return true;
            }
        }
        return false;
    }

    function addBookmark(a) {
        try {
            if (typeof a == "object" && a.tagName.toLowerCase() == "a") {
                a.style.cursor = 'pointer';
                if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) {
                    window.sidebar.addPanel(cjTitle, cjHref, ""); // Gecko
                    return false;   
                } else if (isMSIE && typeof window.external == "object") {
                    if (isIE8()) {
                        window.external.AddToFavoritesBar(cjHref, cjTitle); // IE 8                    
                    } else {
                        window.external.AddFavorite(cjHref, cjTitle); // IE <=7
                    }
                    return false;
                } else if (window.opera) {
                    a.href = cjHref;
                    a.title = cjTitle;
                    a.rel = 'sidebar'; // Opera 7+
                    return true;
                } else {
                    alert(hotKeys());
                }
            } else {
                throw "Error occured.\r\nNote, only A tagname is allowed!";
            }
        } catch (err) {
            alert(err);
        }

    }

    return {
        addBookmark : addBookmark
    }
}();
