1/*
2 * jquery.socialshareprivacy.js | 2 Klicks fuer mehr Datenschutz
3 *
4 * http://www.heise.de/extras/socialshareprivacy/
5 * http://www.heise.de/ct/artikel/2-Klicks-fuer-mehr-Datenschutz-1333879.html
6 *
7 * Copyright (c) 2011 Hilko Holweg, Sebastian Hilbig, Nicolas Heiringhoff, Juergen Schmidt,
8 * Heise Zeitschriften Verlag GmbH & Co. KG, http://www.heise.de
9 *
10 * Copyright (c) 2012 Mathias Panzenböck
11 *
12 * is released under the MIT License http://www.opensource.org/licenses/mit-license.php
13 *
14 * Spread the word, link to us if you can.
15 */
16
17(function ($, undefined) {
18	"use strict";
19
20	$.fn.socialSharePrivacy.settings.services.stumbleupon = {
21		'status'            : true,
22		'button_class'      : 'stumbleupon',
23		'dummy_line_img'    : 'images/dummy_stumbleupon.png',
24		'dummy_box_img'     : 'images/dummy_box_stumbleupon.png',
25		'dummy_alt'         : '"Stumble!"-Dummy',
26		'txt_info'          : 'Two clicks for more privacy: The Stumble! button will be enabled once you click here. Activating the button already sends data to StumbleUpon &ndash; see <em>i</em>.',
27		'txt_off'           : 'not connected to StumbleUpon',
28		'txt_on'            : 'connected to StumbleUpon',
29		'perma_option'      : true,
30		'display_name'      : 'Stumble Upon',
31		'referrer_track'    : '',
32		'button'            : function (options, uri, settings) {
33			var base_url = 'https:' === document.location.protocol ? 'https://' : 'http://';
34			var w, h;
35
36			if (settings.layout === 'line') {
37				w = '74';
38				h = '18';
39				base_url += 'badge.stumbleupon.com/badge/embed/1/?';
40			}
41			else {
42				w = '50';
43				h = '60';
44				base_url += 'badge.stumbleupon.com/badge/embed/5/?';
45			}
46
47			return $('<iframe allowtransparency="true" frameborder="0" scrolling="no"></iframe>').attr({
48				src:    base_url+$.param({url: uri + options.referrer_track}),
49				width:  w,
50				height: h
51			});
52		}
53	};
54})(jQuery);
55