
var ghmxy_align = 'center';
var ghmxy_type = 'absolute';
var ghmxy_identifier = "B82VTeN47cuBsZk32mamTMWnXhYZBS80wpxPFKMSTfr.b7";

var tuba2 = {

	flashvars: { type: '' },

	fullUrl: document.location,

	slideshow: {},

	comments: {

		offset: 0,
		counter: -1,
		firstTime: true,

		getComments: function(offset, force) {

			if (typeof(offset) != 'undefined') {
				tuba2.comments.offset = offset;
			}

			if (typeof(force) == 'undefined') {
				force = false;
			}

			tuba2.jx.load(tuba2.baseUrl + 'html/komentarze?id=' + encodeURIComponent(tuba2.flashvars.id) +
				'&type=' + encodeURIComponent(tuba2.flashvars.type) +
				'&offset=' + encodeURIComponent(tuba2.comments.offset) +
				'&force=' + encodeURIComponent(force) +
				'&counter=' + encodeURIComponent(tuba2.comments.counter),

				function(data) {

					var right;
					var maxleft;
					var maxright;
					var x;

					if (data.result && data.refresh) {

						// nie ma nowych komentarzy
						if (tuba2.comments.counter == data.counter && !firstTime) { return false; }

						firstTime = true;

						tuba2.comments.counter = data.counter;

						var s = '<ul>';
						for(var i in data.comments) {

							if (data.comments[i].user_login !== null) {

								data.comments[i].user_img = tuba2.avatarsUrl + data.comments[i].user_img + '?' + data.comments[i].user_cache;

								s += '<li class="comment"><img alt="' + tuba2.commons.htmlspecialchars(data.comments[i].user_login, 'ENT_NOQUOTES') + '" class="comment-avatar" src="' + data.comments[i].user_img + '" />' +
								'<a href="' + tuba2.baseUrl + 'profil/' + tuba2.commons.htmlspecialchars(data.comments[i].user_login, 'ENT_NOQUOTES') + '" class="comment-author">' + tuba2.commons.htmlspecialchars(data.comments[i].user_login,'ENT_NOQUOTES') + '</a>' +								
								'<span class="comment-date">' + data.comments[i].timestamp + '</span>' +
								'<p class="comment-content">' + tuba2.commons.htmlspecialchars(data.comments[i].comment, 'ENT_NOQUOTES') + '</p></li>';

							}

						}

						s += '</ul><div style="clear:both"></div><ul id="pagination">';

						var pages = Math.ceil(data.counter / data.comments_by_page);

						if (tuba2.comments.offset >= pages) {
							tuba2.comments.offset = pages - 1;
						}

						if (tuba2.comments.offset < 0) { tuba2.comments.offset = 0;	}

						var pager = 5;

						var left = tuba2.comments.offset - Math.floor(pager / 2);
						var maxItems = (pages < pager) ?  pages : pager;

						while ((left + maxItems) > pages) { left--; }


						left = (left < 0) ? 0 : left;

						var pagesItems = [];

						for (i = 0; i < maxItems; i++) {
							x = i + left;
							pagesItems.push(x);
						}

						if (tuba2.comments.offset > pager/2) { maxleft = 0; }
						if (tuba2.comments.offset > 0) { left = tuba2.comments.offset - 1; }

						if (tuba2.comments.offset < pages - 1) { right = tuba2.comments.offset + 1; }
						if (tuba2.comments.offset < (pages - pager / 2)) { maxright = pages - 1; }

						var visibleItems = data.comments.length;

						tuba2.fullUrl = document.location.toString();
						var thelocationsplit = tuba2.fullUrl.split('#');
						tuba2.fullUrl = thelocationsplit[0];


						if (tuba2.comments.offset > 0) {
							s += '<li><button onclick="return tuba2.comments.getComments(' + left + ', true)">'+tuba2.messages.prev+'</button></li>';
						}

						for(i=0;i<pagesItems.length;i++) {
							x = pagesItems[i]+1;
							if (x-1 == tuba2.comments.offset) {
								s += '<li class="selected">' + x + '</li>';
								} else {
									s += '<li><button onclick="return tuba2.comments.getComments(' + pagesItems[i] +', true)">' + x + '</button></li>';
								}
						}

						if (right) {
							s += '<li><button onclick="return tuba2.comments.getComments(' + right + ', true)">'+tuba2.messages.next +'</button></li>';
						}

						s += '</ul>';

						document.getElementById('comments').innerHTML = s;

					}

					if (!data.result) {
						if (document.getElementById('comments')) {
							document.getElementById('comments').innerHTML = '<p class="no-comments">'+tuba2.messages.add_comment +'</p>';
						}
					}

					return false;

				},

			'json','POST');

			return false;

		}

    },

	facebook_merge_login: function(e) {

		FB.getLoginStatus(function(response) {

			if (response.session) {

				return tuba2.commons.mergeProfile(response);

			}

			return false;

		});

		return false;

	},


	facebook_login: function(e) {

		if (tuba2.uas0vsdjio0211) return false;

		FB.getLoginStatus(function(response) {

			if (response.session) {

				return tuba2.commons.connectProfile(response);

			}

		});

	},



	commons: {

		isIE: function() {

		  return (/msie/i).test(navigator.userAgent) && !(/opera/i).test(navigator.userAgent);

		},


		fbInit: function() {

			if (tuba2.facebook) {

				FB.init({appId: '60d62f40c465c9efc180e05d240c07c5', status: true, cookie: true, xfbml: true, channelUrl  : tuba2.baseUrl + 'channel.html'});

			}

		},
		
		deleteArtist: function(e) {
		
			tuba2.jx.load(tuba2.baseUrl + 'html/blokuj_artyste?radio-id=' + tuba2.flashvars.id + '&artist-id=' + tuba2.flashvars.artist_id,

				function(data) {

					if (data.result) {

						tuba2.radio.not_prefers_artists = data.artists;
					
						document.getElementById('delete-artist').className = "transparent";

					} else {

						tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);

					}


					return false;

				},

			'json', 'POST');
		
		},	
		
		deleteSong: function(e) {
		
			tuba2.jx.load(tuba2.baseUrl + 'html/usun_utwor?radio-id=' + tuba2.flashvars.id + '&artist-id=' + tuba2.flashvars.artist_id + '&song-id=' + tuba2.flashvars.song_id,

				function(data) {

					if (data.result) {

						tuba2.radio.songs = data.songs;
					
						document.getElementById('delete-song').className = "transparent";

					} else {

						tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);

					}


					return false;

				},

			'json', 'POST');
		
		},

		shareMail: function(object) {

			var html_code =

				'<div id="mail-popup"><h3>Powiadom znajomych e-mailem</h3>' +
					'<form action="${baseUrl}powiadom" method="post" id="form-mail">' +
						'<fieldset>' +
							'<label for="mail-address">Adresat:</label>' +
							'<input class="text" id="mail-address" name="mail-address" title="Adres email odbiorcy" type="text"/>' +
							'<p>* podaj adresy email odbiorców, odziel je przecinkami</p>' +
							'<label for="mail-from">Nadawca:</label>' +
							'<input class="text" id="mail-from" name="mail-from" title="Wpisz swój login lub imię i nazwisko" type="text"/>' +
							'<input style="margin-left: auto; margin-right: auto;" class="submit" type="submit" value="Wyślij"/>' +
							'<p>Przed wysłaniem prosimy uważnie sprawdzić czy email adresata został podany poprawnie.</p>' +
						'</fieldset>' +
					'</form>' +
				'</div>';

			TINY.box.show({html:html_code,width:540,height:280,mask:true,animate:false,openjs:function(e) {

				if (document.getElementById('form-mail')) {

					document.getElementById('form-mail').onsubmit = function() {

						if (this['mail-address'].value.length === 0) { return false; }

						tuba2.jx.load(tuba2.baseUrl + 'html/powiadom?mail=' + encodeURIComponent(this['mail-address'].value) +
							'&from=' + encodeURIComponent(this['mail-from'].value) +
							'&id=' + encodeURIComponent(tuba2.flashvars.id) +
							'&name=' + encodeURIComponent(tuba2.flashvars.name) +
							'&type=' + encodeURIComponent(tuba2.flashvars.type) +
							'&url=' + encodeURIComponent(tuba2.flashvars.construction),

							function(data) {

								if (data.result) {

									tuba2.commons.jsMessage(tuba2.messages.thanks, tuba2.messages.send_info_ok);

								} else {

									tuba2.commons.jsMessage(tuba2.messages.warning, tuba2.messages.send_info_error);

								}

							},

						'json', 'POST');

						this.reset();

						return false;

					};
				}

			}});

		},

		shareRadio: function(object) {
		
			var object = object || false;

			var html_code =
				'<h3>Podziel się radiem</h3>' +
				'<ul id="share">' +
					'<li><a target="_blank" href="http://www.facebook.com/share.php?v=4&src=bm&u=' + tuba2.fullUrl + '" title="Poleć radio na Facebooku"><img alt="Poleć radio na Facebooku" src="' + tuba2.staticUrl + '_img/facebook1.png"/></a></li>' +
					'<li><a target="_blank" href="http://blip.pl/dashboard?body=Słucham ' + tuba2.flashvars.name + '%20' + tuba2.fullUrl + '" title="Poleć radio na Blipie"><img alt="Poleć radio na Blipie" src="' + tuba2.staticUrl + '_img/blip1.png"/></a></li>' +
					'<li><a target="_blank" href="http://nasza-klasa.pl/sledzik?shout=Słucham ' + tuba2.flashvars.name + '%20' + tuba2.fullUrl + '" title="Poleć radio na Śledziku"><img alt="Poleć radio na Śledziku" src="' + tuba2.staticUrl + '_img/sledzik1.png"/></a></li>' +
					'<li><button class="clean-button" id="share-mail" title="Poleć radio mailem"><img alt="Poleć radio mailem" src="' + tuba2.staticUrl + '_img/mail1.png"/></button></li>' +
				'</ul>';

			TINY.box.show({html:html_code,width:330,mask:true,height:150,animate:false,openjs:function(e) {

				if (document.getElementById('share-mail')) {

					document.getElementById('share-mail').onclick = function(e) {

						return tuba2.commons.shareMail(this);

					}

				}

			}});

		},

		toFavorites: function(object) {
		
			var object = object || false;

			tuba2.jx.load(tuba2.baseUrl + 'html/do_ulubionych?id=' + tuba2.flashvars.id + '&type=' + tuba2.flashvars.type,

				function(data) {

					if (data.result) {

						object.className = "transparent";

						tuba2.commons.jsMessage(tuba2.messages.thanks, tuba2.messages.add_favorites_ok);


					} else {

						object.className = "transparent";

						tuba2.commons.jsMessage(tuba2.messages.warning, tuba2.messages.add_favorites_exists);

					}


					return false;

				},

			'json', 'POST');

		},

		jsMessage: function(title, message) {

			var html_code =
				'<h2>' +
					title +
				'</h2>' +
				'<div class="alert">' +
					'<p>' + message + '</p>' +
					'<p class="buttons one"><button id="unique-button-ok" class="button">OK</button></p>' +
				'</div>';

			TINY2.box2.show({html:html_code,width:640,height:320,mask:true,animate:false,openjs:function(e) {

				document.getElementById('unique-button-ok').onclick = function(e) {

					TINY2.box2.hide();

					return false;

				}

			}});

		},




		comments_logged: function() {

			if (document.getElementById('comments-form')) {

				document.getElementById('comments-form').onsubmit = function() {

					var inputValue = this['comment-input'];

					if (this['comment-input'].value.length === 0) { return false; }

					tuba2.jx.load(tuba2.baseUrl + 'html/zapisz_komentarz?id=' + encodeURIComponent(tuba2.flashvars.id) +
					'&type=' + encodeURIComponent(tuba2.flashvars.type) +
					'&comment=' + encodeURIComponent(this['comment-input'].value),

						function(data) {

							if (data.result) {

								inputValue.value = '';

								tuba2.comments.getComments();

							} else {

								tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);
								
							}

							return false;

						},

					'json','POST');

					return false;

				};



			}

		},




		split_facebook_tuba: function() {

			if (document.getElementById('split_facebook_tuba')) {

				document.getElementById('split_facebook_tuba').onclick = function(e) {

					TINY.box.show({url:tuba2.baseUrl + 'html/rozlacz_profil',width:640,height:320,method:'POST',mask:true,animate:false,openjs: function() {

						document.getElementById('anuluj').onclick = function(e) {

							TINY.box.hide();

							return false;

						}

						document.getElementById('rozlacz_profil').onclick = function(e) {

								tuba2.jx.load(tuba2.baseUrl + 'html/rozlacz_profil/confirm', function(data) {

									if (data.result == false) {

										TINY.box.show({html:'<h2>' + tuba2.messages.warning + '</h2><div class="alert"><p>' + data.error.message + '</p><p class="buttons one"><button id="unique-button-ok" class="button">OK</button></p></div>',width:640,height:320,mask:true,animate:false,openjs:function(e) {

											document.getElementById('unique-button-ok').onclick = function(e) {

												TINY.box.hide();

												return false;

											}


										}});

										return false;

									}

									if (data.result == true) {

										TINY.box.show({html:data.data,width:640,height:320,animate:false,mask:true,openjs:function(e) {

											document.getElementById('unique-button-ok').onclick = function(e) {

												TINY.box.hide();

												return false;

											}


										}});

										document.getElementById('split_facebook_tuba').style.visibility = 'hidden';



										if (document.getElementById('facebook_merge').firstChild) {

											document.getElementById('facebook_merge').style.display = 'block';

										} else {

											document.getElementById('facebook_merge').innerHTML = '<fb:login-button perms="email,user_birthday,user_location" onlogin="javascript:tuba2.facebook_merge_login();">Połącz konto z kontem na Facebook</fb:login-button>';
											tuba2.commons.fbInit();

										}

										return false;

									}

									return false;

								}, 'json', 'POST');

								return false;

						}

					}});

				}

			}

		},

		
		editRadioAction: function(e) {
		
			tuba2.jx.load(tuba2.baseUrl + 'html/edytuj_radio/' + tuba2.flashvars.pid, function(data) {

				if (data.result) {

					TINY.box.show({html:data.data,width:640,height:320,method:'POST',animate:false,mask:true,openjs: function() {
					
						if (typeof tuba2.flashvars.editTab == 'undefined')
							tuba2.flashvars.editTab = 2;
				
						document.getElementById('edit-radio-button').onclick = function(e) {
						
							document.getElementById('edit-radio-button').className = 'selected';
							document.getElementById('edit-artists-button').className = '';
							document.getElementById('edit-not-prefers-artists-button').className = '';
							document.getElementById('edit-songs-button').className = '';
							
							document.getElementById('edit-radio-manager').style.display = 'block';
							document.getElementById('edit-artist-manager').style.display = 'none';
							document.getElementById('edit-not-prefers-artist-manager').style.display = 'none';
							document.getElementById('edit-songs-manager').style.display = 'none';	

							tuba2.flashvars.editTab = 2;
							

							if (document.getElementById("ajax-upload")) {

								document.getElementById("ajax-upload").onchange = function() {

									if (document.getElementById('uploaded-avatar')) {

										document.getElementById('uploaded-avatar').firstChild.src = tuba2.staticUrl + '_img/empty.gif';

									}

									if (document.getElementById('uploaded-logo')) {

										document.getElementById('uploaded-logo').firstChild.src = tuba2.staticUrl + '_img/empty.gif';

									}


									return tuba2.ajaxUpload(document.getElementById('ajax-form'));

								};

							}						
							
							document.getElementById('save-radio').onsubmit = function(e) {
							
								if (document.getElementById('radio-name').value == '') {
								
									tuba2.commons.jsMessage(tuba2.messages.warning, tuba2.messages.radio_name_empty);
									return false;
									
								}
								
								tuba2.jx.load(document.getElementById('save-radio').action + '?radio-name=' + encodeURIComponent(document.getElementById('radio-name').value) +
									'&radio-description=' + encodeURIComponent(document.getElementById('radio-description').value) +
									'&radio-artist=' + encodeURIComponent(document.getElementById('radio-artist').value) +
									'&radio-img=' + encodeURIComponent(document.getElementById('radio-img').value) +
									'&radio-id=' + encodeURIComponent(document.getElementById('radio-id').value),

									function(data) {

										if (data.result) {
										
											TINY.box.hide();

											if (data.radio_img) {
											
												document.getElementById('radio-logo').getElementsByTagName('img')[0].src = tuba2.masterCoversUrl + data.radio_img + '?' + data.radio_cache;
												
											}
											document.getElementById('big-title').innerHTML = data.radio_name;
											document.getElementById('big-description').innerHTML = data.radio_description;										

										} else {
										
											document.getElementById('radio-error').innerHTML = data.error.message;
										
										}

										return false;

									},

								'json','POST');
							
								return false;
							
							}
						
						}
						
						document.getElementById('edit-artists-button').onclick = function(e) {
						
							document.getElementById('edit-radio-button').className = '';
							document.getElementById('edit-artists-button').className = 'selected';
							document.getElementById('edit-not-prefers-artists-button').className = '';
							document.getElementById('edit-songs-button').className = '';
							
							document.getElementById('edit-radio-manager').style.display = 'none';
							document.getElementById('edit-artist-manager').style.display = 'block';
							document.getElementById('edit-not-prefers-artist-manager').style.display = 'none';
							document.getElementById('edit-songs-manager').style.display = 'none';						
							
							tuba2.flashvars.editTab = 0;
							
							tuba2.radio.autocomplete = new tuba2.autocomplete.init('edit-artist-manager-artist', 'edit-radio-search-autocomplete', 'edit-artist-manager-form', {}, 'tuba2.radio.autocomplete');
							
							document.getElementById('edit-artist-manager-form').onsubmit = function(e) {
							
								if (tuba2.radio.autocomplete.completer.search == '') return false;

								if (typeof tuba2.flashvars.queryID == 'undefined')
									tuba2.flashvars.queryID = '';
									
								tuba2.jx.load(tuba2.baseUrl + 'html/dodaj_artyste?radio-id=' + encodeURIComponent(tuba2.flashvars.id) + '&artist-id=' + encodeURIComponent(tuba2.flashvars.queryID) + '&artist-name=' + encodeURIComponent(tuba2.radio.autocomplete.completer.search), function(data) {
								
									if (data.result) {
															
										tuba2.radio.artists = data.artists;
										
										tuba2.radio.parseArtists();
									
									} else {
										
										tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);
									
									}
								
								}, 'json', 'POST');
							
								return false;
							
							}			

							tuba2.radio.parseArtists();						
						
						}		

						document.getElementById('edit-not-prefers-artists-button').onclick = function(e) {
						
							document.getElementById('edit-radio-button').className = '';
							document.getElementById('edit-artists-button').className = '';
							document.getElementById('edit-not-prefers-artists-button').className = 'selected';
							document.getElementById('edit-songs-button').className = '';
							
							document.getElementById('edit-radio-manager').style.display = 'none';
							document.getElementById('edit-artist-manager').style.display = 'none';
							document.getElementById('edit-not-prefers-artist-manager').style.display = 'block';
							document.getElementById('edit-songs-manager').style.display = 'none';						
							
							tuba2.flashvars.editTab = 1;
							
							tuba2.radio.autocomplete2 = new tuba2.autocomplete.init('edit-not-prefers-artist-manager-artist', 'edit-not-prefers-radio-search-autocomplete', 'edit-not-prefers-artist-manager-form', {}, 'tuba2.radio.autocomplete2');
							
							document.getElementById('edit-not-prefers-artist-manager-form').onsubmit = function(e) {
							
								if (tuba2.radio.autocomplete2.completer.search == '') return false;

								if (typeof tuba2.flashvars.queryID == 'undefined')
									tuba2.flashvars.queryID = '';
									
								tuba2.jx.load(tuba2.baseUrl + 'html/blokuj_artyste?radio-id=' + encodeURIComponent(tuba2.flashvars.id) + '&artist-id=' + encodeURIComponent(tuba2.flashvars.queryID) + '&artist-name=' + encodeURIComponent(tuba2.radio.autocomplete2.completer.search), function(data) {
								
									if (data.result) {
															
										tuba2.radio.not_prefers_artists = data.artists;
										
										tuba2.radio.parseArtists();
									
									} else {
										
										tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);
									
									}
								
								}, 'json', 'POST');
							
								return false;
							
							}
							
							tuba2.radio.parseArtists();
						
						}		

						
						document.getElementById('edit-songs-button').onclick = function(e) {
						
							document.getElementById('edit-radio-button').className = '';
							document.getElementById('edit-artists-button').className = '';
							document.getElementById('edit-not-prefers-artists-button').className = '';
							document.getElementById('edit-songs-button').className = 'selected';
							
							document.getElementById('edit-radio-manager').style.display = 'none';
							document.getElementById('edit-artist-manager').style.display = 'none';
							document.getElementById('edit-not-prefers-artist-manager').style.display = 'none';
							document.getElementById('edit-songs-manager').style.display = 'block';
							
							tuba2.flashvars.editTab = 3;
							
							tuba2.radio.parseSongs();
						
						}	
		
						switch(tuba2.flashvars.editTab) {
							case 0: document.getElementById('edit-artists-button').onclick(); break;
							case 1: document.getElementById('edit-not-prefers-artists-button').onclick(); break;
							case 2: document.getElementById('edit-radio-button').onclick(); break;
							case 3: document.getElementById('edit-songs-button').onclick(); break;
						}					

						return false;

					}});

				} else {

					tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);

				}

				return false;


			}, 'json', 'POST');
		
		
		},
		

		saveRadioAction: function(e) {

			tuba2.jx.load(tuba2.baseUrl + 'html/zapisz_radio/' + tuba2.flashvars.id, function(data) {

				if (data.result) {

					TINY.box.show({html:data.data,width:640,height:320,method:'POST',animate:false,mask:true,openjs: function() {

						if (document.getElementById("ajax-upload")) {

							document.getElementById("ajax-upload").onchange = function() {

								if (document.getElementById('uploaded-avatar')) {

									document.getElementById('uploaded-avatar').firstChild.src = tuba2.staticUrl + '_img/empty.gif';

								}

								if (document.getElementById('uploaded-logo')) {

									document.getElementById('uploaded-logo').firstChild.src = tuba2.staticUrl + '_img/empty.gif';

								}


								return tuba2.ajaxUpload(document.getElementById('ajax-form'));

							};

						}					
					
						if (document.getElementById('save-radio')) {

							document.getElementById('save-radio').onsubmit = function(e) {

								if (document.getElementById('radio-name').value == '') {
									document.getElementById('radio-error').innerHTML = 'nazwa radia nie może pozostać pusta';
									return false;
								}

								tuba2.jx.load(document.getElementById('save-radio').action + '?radio-name=' + encodeURIComponent(document.getElementById('radio-name').value) +
									'&radio-description=' + encodeURIComponent(document.getElementById('radio-description').value) +
									'&radio-artist=' + encodeURIComponent(document.getElementById('radio-artist').value) +
									'&radio-img=' + encodeURIComponent(document.getElementById('radio-img').value) +
									'&radio-id=' + encodeURIComponent(document.getElementById('radio-id').value),

									function(data) {

										if (data.result) {

											setTimeout( function() {

												document.location.href = tuba2.baseUrl + 'radio/' + tuba2.commons.htmlspecialchars(data.user_login) + '/' + tuba2.commons.htmlspecialchars(data.radio_pid) + '/' + tuba2.commons.htmlspecialchars(data.radio_link);

											}, 200);

										} else {
										
											document.getElementById('radio-error').innerHTML = data.error.message;
										
										}

										return false;

									},

								'json','POST');
								
								return false;

							}

						}

						return false;

					}});

				} else {

					tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);

				}

				return false;


			}, 'json', 'POST');

			return false;

		},

		refreshPlaylist: function(obj) {

			var artistWidth;
			var songWidth;
			var is_ad = false;
			
			if (obj.parameter[0][0] == -9999)
				var is_ad = true;

			if (is_ad) {
				
				document.getElementById("artist").innerHTML = '<span title="Reklama">Reklama w fm.tuba.pl</span>';
				document.getElementById("song").innerHTML = '';
				document.getElementById("album").src = '';
				document.getElementById("album").alt = '';
			
			} else {
					
				document.getElementById("playlist") ? document.getElementById("artist").innerHTML = '<a href="' + tuba2.baseUrl +'radio-internetowe/' + tuba2.commons.htmlspecialchars(obj.parameter[0][7]) + '" title="' + tuba2.messages.listen + tuba2.commons.htmlspecialchars(obj.parameter[0][1])+'">'+tuba2.commons.htmlspecialchars(obj.parameter[0][1],'ENT_NOQUOTES')+'</a>' : document.getElementById("artist").innerHTML = '<span title="' + tuba2.messages.listen + tuba2.commons.htmlspecialchars(obj.parameter[0][1])+'">'+tuba2.commons.htmlspecialchars(obj.parameter[0][1],'ENT_NOQUOTES')+'</span>';

				if (document.defaultView) {

					artistWidth = document.defaultView.getComputedStyle(document.getElementById("artist"),null).getPropertyValue('width');

				} else {

					artistWidth = document.getElementById("artist").currentStyle.width;

				}

				artistWidth = artistWidth.substr(0,artistWidth.length-2);

				if (artistWidth > 222) {

					document.getElementById("artist").style.overflow = 'hidden';
					document.getElementById("artist").style.width = '230px';

					document.getElementById("artist").onmouseover = function(ev) {

						document.getElementById("artist").className = "hover";

					};


					document.getElementById("artist").onmouseout = function(ev) {

						document.getElementById("artist").className = "";

					};


				}

				if (obj.parameter[0][8]) {
				
					document.getElementById("kup").style.visibility = 'visible';
					document.getElementById("kup").href = obj.parameter[0][8];
					
				} else {
				
					document.getElementById("kup").style.visibility = 'hidden';
					
				}

				document.getElementById("song").innerHTML = tuba2.commons.htmlspecialchars(obj.parameter[0][3],'ENT_NOQUOTES');

				if (document.defaultView) {

					songWidth = document.defaultView.getComputedStyle(document.getElementById("song"),null).getPropertyValue('width');

				} else {

					songWidth = document.getElementById("song").currentStyle.width;

				}

				songWidth = songWidth.substr(0,songWidth.length-2);

				if (songWidth > 222) {

					document.getElementById("song").style.overflow = 'hidden';
					document.getElementById("song").style.width = '230px';

					document.getElementById("song").onmouseover = function() {

						document.getElementById("song").className = "hover";

					};

					document.getElementById("song").onmouseout = function() {

						document.getElementById("song").className = "";

					};

				}
				
				if (window.webkitNotifications && window.webkitNotifications.checkPermission() == 0) {
					var notification = window.webkitNotifications.createNotification(tuba2.zcoversUrl + obj.parameter[0][5], obj.parameter[0][1], obj.parameter[0][3]);
					notification.show();
					setTimeout(function() { notification.cancel(); }, 6000);
				}
				
				if (obj.parameter[0][3] == '')
				tab.change(tuba2.zcoversUrl + obj.parameter[0][5],obj.parameter[0][1]); else
				tab.change(tuba2.zcoversUrl + obj.parameter[0][5],obj.parameter[0][1] + ' - ' + obj.parameter[0][3]);
				
			}

			var artists = tuba2.commons.xGetElementsByClassName2('artist-name');
			var songs = tuba2.commons.xGetElementsByClassName2('song-title');
			var links = tuba2.commons.xGetElementsByClassName2('artist-link');
			var image = tuba2.commons.xGetElementsByClassName2('album-image');
			var albums = tuba2.commons.xGetElementsByClassName2('album-title');

			var timestamp = Number(new Date());
			
			var pi = 0;
			
			for(var i=0;i<artists.length;i++) {
			
				if (obj.parameter[pi+1][0] == -9999) {
				
					pi++;
				
				}
			
				links[i].href = tuba2.baseUrl +'radio-internetowe/' + tuba2.commons.htmlspecialchars(obj.parameter[pi+1][7]);
				artists[i].innerHTML = tuba2.commons.htmlspecialchars(obj.parameter[pi+1][1],'ENT_NOQUOTES');
				links[i].title = tuba2.messages.listen + tuba2.commons.htmlspecialchars(obj.parameter[pi+1][1],'ENT_NOQUOTES');
				songs[i].innerHTML = tuba2.commons.htmlspecialchars(obj.parameter[pi+1][3],'ENT_NOQUOTES');

				if (albums[i]) {
				
					albums[i].innerHTML = tuba2.commons.htmlspecialchars(obj.parameter[pi+1][4],'ENT_NOQUOTES');
					
				}

				image[i].alt = tuba2.commons.htmlspecialchars(obj.parameter[pi+1][1],'ENT_NOQUOTES');
				image[i].src = tuba2.zcoversUrl + obj.parameter[pi+1][5] + '?t=' + timestamp;
				
				pi++;

			}		

			document.getElementById("album").src = tuba2.zcoversUrl + obj.parameter[0][5] + '?t=' + timestamp;

			document.getElementById("album").alt = tuba2.commons.htmlspecialchars(obj.parameter[0][1],'ENT_NOQUOTES');
					
			if (document.getElementById("delete-song"))
				document.getElementById("delete-song").className = '';
				
			if (document.getElementById("delete-artist"))
				document.getElementById("delete-artist").className = '';

		},


		registerAction: function() {

			TINY.box.show({url:'html/rejestracja',width:640,height:320,animate:false,method:'POST',mask:true,openjs: function() {

				tuba2.commons.fbInit();

				tuba2.commons.preActions();

				return false;

			}});

			return false;

		},


		logoutAction: function() {

			tuba2.jx.load(tuba2.baseUrl + 'wyloguj?reload=' + encodeURIComponent(document.location) + (document.getElementById('comments_logged') ? '&comments=true' : ''),

				function(data) {

					if (data.result == false) {
					
						tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);

						return false;

					}

					if (data.result == true) {

						if (data.facebook) {

							FB.getLoginStatus(function(response) {

								if (response.session) {

									FB.logout(function(response) {

									});

								} else {

								}

							});

						}

						if (data.reload) {

							document.location = tuba2.baseUrl;

							return false;

						}

						document.getElementById('user_panel').innerHTML = data.data;

						if (document.getElementById('comments_logged')) {

							document.getElementById('comments_logged').innerHTML = data.comments;

							tuba2.commons.comments_logged();

						}

						tuba2.uas0vsdjio0211 = false;

						tuba2.commons.preActions(true);

						return false;

					}

					return false;

				},

			'json', 'POST');

			return false;

		},

		merge_facebook_tuba: function() {

			tuba2.jx.load(tuba2.baseUrl + 'html/polacz_profil_tuba',

				function(data) {

					TINY.box.show({html:data.data,width:640,height:320,method:'POST',animate:false,mask:true,openjs: function() {

						document.getElementById('form_login').onsubmit = function(e) {

							if (document.getElementById('login').value == '') {

								document.getElementById('login_error').innerHTML = tuba2.messages.login_empty;
								document.getElementById('login_error').style.display = 'block';

								return false;

							}

							if (document.getElementById('password').value == '') {

								document.getElementById('login_error').innerHTML = tuba2.messages.password_empty;
								document.getElementById('login_error').style.display = 'block';

								return false;

							}

							document.getElementById('login').onchange = function(e) {

								document.getElementById('login_error').innerHTML = '';
								document.getElementById('login_error').style.display = 'none';

							}

							document.getElementById('password').onchange = function(e) {

								document.getElementById('login_error').innerHTML = '';
								document.getElementById('login_error').style.display = 'none';

							}

							document.getElementById('login').onfocus = document.getElementById('login').onchange;
							document.getElementById('password').onfocus = document.getElementById('login').onchange;

							document.getElementById('login_error').style.display = 'none';

							tuba2.jx.load(tuba2.baseUrl + 'html/polacz_profil_tuba?login=' + encodeURIComponent(document.getElementById('login').value) +
								'&password=' + encodeURIComponent(document.getElementById('password').value) + '&reload=' + encodeURIComponent(document.location),

								function(data) {

									if (typeof data.reload == 'undefined')
										data.reload = false;

									if (data.result == false) {

										document.getElementById('login_error').innerHTML = data.error.message;
										document.getElementById('login_error').style.display = 'block';

										return false;

									}

									if (data.result == true) {

										if (data.reload) {

											document.location = document.location;

										} else {

											TINY.box.show({html:data.data,width:640,height:320,animate:false,mask:true,openjs:function(e) {

												document.getElementById('unique-button-ok').onclick = function(e) {

													TINY.box.hide();

													return false;

												}


											}});


											document.getElementById('user_panel').innerHTML = data.user;

											tuba2.commons.preActions(true);

											return false;

										}


									}

									return false;

								},

							'json','POST');

							return false;

						}

					}});

				},

			'json','POST');

			return false;


		},

		loginAction: function() {

			TINY.box.show({url:'html/zaloguj' + (document.getElementById('comments_logged') ? '?comments=true' : ''),width:640,height:320,mask:true,method:'POST',animate:false,openjs: function() {

				tuba2.commons.fbInit();

				document.getElementById('form_login').onsubmit = function(e) {

					if (document.getElementById('login').value == '') {

						if (document.getElementById('login_error')) {

							document.getElementById('login_error').innerHTML = tuba2.messages.login_empty;
							document.getElementById('login_error').style.display = 'block';

						}

						return false;

					}

					if (document.getElementById('password').value == '') {

						if (document.getElementById('login_error')) {

							document.getElementById('login_error').innerHTML = tuba2.messages.password_empty;
							document.getElementById('login_error').style.display = 'block';

						}

						return false;

					}

					document.getElementById('login').onchange = function(e) {

						if (document.getElementById('login_error')) {

							document.getElementById('login_error').innerHTML = '';
							document.getElementById('login_error').style.display = 'none';

						}

					}

					document.getElementById('password').onchange = function(e) {

						if (document.getElementById('login_error')) {

							document.getElementById('login_error').innerHTML = '';
							document.getElementById('login_error').style.display = 'none';

						}

					}

					document.getElementById('login').onfocus = document.getElementById('login').onchange;
					document.getElementById('password').onfocus = document.getElementById('login').onchange;

					document.getElementById('login_error').style.display = 'none';

					tuba2.jx.load(tuba2.baseUrl + 'zaloguj?login=' + encodeURIComponent(document.getElementById('login').value) +
						'&password=' + encodeURIComponent(document.getElementById('password').value) + (document.getElementById('comments_logged') ? '&comments=true' : ''),

						function(data) {

							if (data.result == false) {

								document.getElementById('login_error').innerHTML = data.error.message;
								document.getElementById('login_error').style.display = 'block';

								return false;

							}

							if (data.result == true) {

								if (data.connect) {

									TINY.box.show({html:data.data,width:640,height:320,animate:false,mask:true,openjs: function() {

										document.getElementById('registration-submit').onclick = function(e) {

											document.getElementById('registration-error').style.display = 'none';
											document.getElementById('registration-error').innerHTML = '';

											tuba2.jx.load(tuba2.baseUrl + 'html/login_zajety?registration-login=' + encodeURIComponent(document.getElementById('registration-login').value),

												function(data) {

													if (data.result == false) {

														document.getElementById('registration-error').style.display = 'block';
														document.getElementById('registration-error').innerHTML = data.error.message;

														return false;

													}

													if (data.result == true) {

														tuba2.uas0vsdjio0211 = true;
														document.getElementById('user_panel').innerHTML = data.data;

														if (document.getElementById('comments_logged')) {

															document.getElementById('comments_logged').innerHTML = data.comments;

															tuba2.commons.comments_logged();

														}

														tuba2.commons.preActions(true);

														TINY.box.hide();

														return false;

													}

													return false;

												},

											'json','POST');

											return false;

										}


									}});


								} else {

									document.getElementById('user_panel').innerHTML = data.data;

									if (document.getElementById('comments_logged')) {

										document.getElementById('comments_logged').innerHTML = data.comments;

										tuba2.commons.comments_logged();

									}

									tuba2.uas0vsdjio0211 = true;

									tuba2.commons.preActions(true);

									TINY.box.hide();

								}

								return false;

							}

							return false;

						},

					'json','POST');

					return false;

				}

				tuba2.commons.preActions(true);

				return false;

			}});

			return false;

		},


		mergeProfile: function(session) {

			tuba2.jx.load(tuba2.baseUrl + 'html/polacz_profil/merge',

				function(data) {

					if (data.result == false) {

						tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);

					}

					if (data.result == true) {

						if (document.getElementById('facebook_merge')) {

							document.getElementById('facebook_merge').style.display = 'none';

						}

						TINY.box.show({html:data.data,width:640,height:320,animate:false,mask:true,openjs:function(e) {

							document.getElementById('unique-button-ok').onclick = function(e) {

								TINY.box.hide();

								return false;

							}


						}});


						if (document.getElementById('facebook_split')) {

							document.getElementById('facebook_split').innerHTML = '<button id="split_facebook_tuba">'+ tuba2.messages.split_facebook +'</button>';

							tuba2.commons.split_facebook_tuba();

						}

						return false;

					}

					return false;

				},

			'json','POST');

			return false;

		},

		connectProfile: function(session, connect) {

			tuba2.jx.load(tuba2.baseUrl + 'html/polacz_profil/session' + (document.getElementById('comments_logged') ? '?comments=true' : ''),

				function(data) {

					if (data.result == false) {
					
						tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);

						return false;

					}

					if (data.result == true) {

						if (data.connect || connect) {

							TINY.box.show({url:tuba2.baseUrl + 'html/posiadasz_konto',width:640,height:320,method:'POST',animate:false,mask:true,openjs: function() {

								document.getElementById('posiadam_konto').onclick = function(e) {

									tuba2.commons.merge_facebook_tuba();

									return false;

								}

								document.getElementById('anuluj').onclick = function(e) {
								
									if (connect) {
					
										TINY.box.hide();

										return false;									
									
									}

									TINY.box.show({html:data.data,width:640,height:320,animate:false,mask:true,openjs: function() {

										document.getElementById('registration-submit').onclick = function(e) {

											document.getElementById('registration-error').style.display = 'none';
											document.getElementById('registration-error').innerHTML = '';

											tuba2.jx.load(tuba2.baseUrl + 'html/polacz_profil?registration-login=' + encodeURIComponent(document.getElementById('registration-login').value) +
												'&registration-avatar=' + encodeURIComponent((document.getElementById('registration-avatar').checked ? 1 : 0)),

												function(data) {

													if (data.result == false) {

														document.getElementById('registration-error').style.display = 'block';
														document.getElementById('registration-error').innerHTML = data.error.message;

														return false;

													}

													if (data.result == true) {

														tuba2.commons.connectProfile(false);

														TINY.box.hide();

														return false;

													}

													return false;

												},

											'json','POST');

											return false;

										}

									}});

									return false;

								}

								return false;

							}});

						} else {

							TINY.box.hide();

							document.getElementById('user_panel').innerHTML = data.data;

							if (document.getElementById('comments_logged')) {

								document.getElementById('comments_logged').innerHTML = data.comments;

								tuba2.commons.comments_logged();

							}

							tuba2.uas0vsdjio0211 = true;

							tuba2.commons.preActions(true);

							return false;

						}

					}

					return false;

				},

			'json', 'POST');

			return false;

		},

		preActions: function(change) {

			var change = change || false;

			if (document.getElementById("moja_tuba")) {

				if (tuba2.uas0vsdjio0211) {

					document.getElementById('main_menu').className = 'main nav logged';
					document.getElementById("moja_tuba").className = '';
					document.getElementById("moja_tuba").style.display = 'block';

				} else {

					document.getElementById("moja_tuba").className = 'hide';
					document.getElementById('main_menu').className = 'main nav';
					document.getElementById("moja_tuba").style.display = 'none';

				}

			}


			if (document.getElementById("ajax-upload")) {

				document.getElementById("ajax-upload").onchange = function() {

					if (document.getElementById('uploaded-avatar')) {

						document.getElementById('uploaded-avatar').firstChild.src = tuba2.staticUrl + '_img/empty.gif';

					}

					if (document.getElementById('uploaded-logo')) {

						document.getElementById('uploaded-logo').firstChild.src = tuba2.staticUrl + '_img/empty.gif';

					}


					return tuba2.ajaxUpload(document.getElementById('ajax-form'));

				};

			}

			if (document.getElementById('button_zaloguj_comments'))
				document.getElementById('button_zaloguj_comments').onclick = function(e) {

					return tuba2.commons.loginAction();

				}


			if (document.getElementById('button_zaloguj'))
				document.getElementById('button_zaloguj').onclick = function(e) {

					return tuba2.commons.loginAction();

				}

			if (document.getElementById('button_wyloguj'))
				document.getElementById('button_wyloguj').onclick = function(e) {

					return tuba2.commons.logoutAction();

				}

			if (document.getElementById('button_rejestruj'))
				document.getElementById('button_rejestruj').onclick = function(e) {

					return tuba2.commons.registerAction();

				}

			var buttons = document.getElementsByTagName('button');

			for (var i in buttons) {

				if (buttons[i]) {

					// ie sucks
					if (tuba2.commons.isIE()) {

						buttons[i].getAttribute = function(attr) {

							var a = this[attr];
							return a;

						};

					}

				}

				if (buttons[i] && typeof(buttons[i].getAttribute) == 'function') {

					if (buttons[i].getAttribute('data-action') == 'share-radio') {

						buttons[i].onclick = function(e) {

							return tuba2.commons.shareRadio(this);

						}

					}


					if (buttons[i].getAttribute('data-action') == 'register') {

						buttons[i].onclick = function(e) {

							return tuba2.commons.registerAction();

						}

					}
					
					if (buttons[i].getAttribute('data-action') == 'to-favorites') {

						buttons[i].onclick = function(e) {

							if (tuba2.uas0vsdjio0211) {

								return tuba2.commons.toFavorites(this);

							} else {

								return tuba2.commons.loginAction();

							}

							return false;

						}

					}
					
					if (buttons[i].getAttribute('data-action') == 'report') {

						buttons[i].onclick = function(e) {

							return tuba2.commons.reportEngine(this);

						}

					}						
					
					if (buttons[i].getAttribute('data-action') == 'delete-artist') {

						buttons[i].onclick = function(e) {

							if (tuba2.uas0vsdjio0211) {

								return tuba2.commons.deleteArtist();

							} else {

								return tuba2.commons.loginAction();

							}

							return false;

						}

					}					
					
					if (buttons[i].getAttribute('data-action') == 'delete-song') {

						buttons[i].onclick = function(e) {

							if (tuba2.uas0vsdjio0211) {

								return tuba2.commons.deleteSong();

							} else {

								return tuba2.commons.loginAction();

							}

							return false;

						}

					}					


					if (buttons[i].getAttribute('data-action') == 'save-radio') {

						buttons[i].onclick = function(e) {

							if (tuba2.uas0vsdjio0211) {

								return tuba2.commons.saveRadioAction();

							} else {

								return tuba2.commons.loginAction();

							}

							return false;

						}

					}
					
					if (buttons[i].getAttribute('data-action') == 'edit-radio') {

						buttons[i].onclick = function(e) {

							if (tuba2.uas0vsdjio0211) {

								return tuba2.commons.editRadioAction();

							} else {

								return tuba2.commons.loginAction();

							}

							return false;

						}

					}					

				}


			}


		},

		preInit: function() {

			if (window.webkitNotifications && window.webkitNotifications.checkPermission() == 1) {
				document.querySelector('*').addEventListener('click', function() {window.webkitNotifications.requestPermission();}, false);
			}

			tuba2.a = new tuba2.autocomplete_main.init('query', 'type', 'autocomplete', 'search', {}, 'tuba2.a');

			tuba2.commons.preActions();

			tuba2.commons.clickTab();

			tuba2.commons.split_facebook_tuba();

			if (document.getElementById('merge_facebook_tuba')) {

				document.getElementById('merge_facebook_tuba').onclick = tuba2.commons.merge_facebook_tuba;

			}


			tuba2.commons.comments_logged();

			if (document.getElementById('feed')) {

				document.getElementById('feed').onsubmit = function() {

					if (tuba2.player.currentSong) {

						var currentSong = tuba2.player.currentSong;

					} else {

						var currentSong = 0;

					}

					tuba2.jx.load(tuba2.baseUrl + 'html/feedback?mail=' + encodeURIComponent(this.mail.value) +
						'&comment=' + encodeURIComponent(this.comment.value) +
						'&type=' + encodeURIComponent(this.type.value) +
						'&url=' + encodeURIComponent(document.location) +
						'&song_id=' + tuba2.player.currentSong,

						function(data) {

							if (data.result) {

								tuba2.commons.jsMessage(tuba2.messages.thanks, tuba2.messages.opinion);

							} else {
													
							}

							document.getElementById('feed').mail.value = '';
							document.getElementById('feed').comment.value = '';

							return false;

						},

					'json','POST');

					return false;

				};

			}
			
			if (document.getElementById('slider')) {

				tuba2.slideshow = new TINY.slider.slide('tuba2.slideshow', {

					id:'slider',
					auto:0,
					resume:false,
					vertical:true,
					navid:'pagination',
					activeclass:'current',
					position:0,
					rewind:false,
					elastic:false,
					left:'slideleft',
					right:'slideright'

				});

			}

		},


		getTab: function() {

			var s = document.location + '';

			var tab = '';

			if (s.lastIndexOf('#') > 0) {

				tab = s.substr(s.lastIndexOf('#')+1,s.length);

			}


			return tab;

		},

		clickTab: function() {


			var tab = tuba2.commons.getTab();

			if ((/brak-artysty/i).test(tab)) {

				tuba2.commons.jsMessage(tuba2.messages.sorry, tuba2.messages.artist_not_found);

			}

			if (tab === 'zaloguj' && !tuba2.uas0vsdjio0211) {

				tuba2.commons.loginAction();

			}

			if (tab === 'ulubione-usuniete') {

				tuba2.commons.jsMessage(tuba2.messages.warning, tuba2.messages.favorites_deleted);
				
			}

			if (tab === 'radio-usuniete') {

				tuba2.commons.jsMessage(tuba2.messages.warning, tuba2.messages.radio_deleted);

			}
			
		},


		reportEngine: function(object) {

			tuba2.jx.load(tuba2.baseUrl + 'html/naruszenie_zasad?radio-id=' + encodeURIComponent(object.getAttribute('data-report')),

				function(data) {
				
					var _object = object;

					if (data.result) {

						tuba2.commons.jsMessage(tuba2.messages.thanks, tuba2.messages.moderator);

					} else {

						tuba2.commons.jsMessage(tuba2.messages.warning, tuba2.messages.moderator_off);
						
					}

					_object.parentNode.removeChild(_object);

					return false;

				},

			'json','POST');

		},


		keyPress: function (event) {

			var keycode;

			if (window.event) {

				keycode = window.event.keyCode;

			} else {

				if (event) {

					keycode = (event.which) ? event.which : event.keyCode;

				}

			}

			return keycode;
		},

		addEvent: function (obj, evType, fn) {

			if (obj.addEventListener) {

				obj.addEventListener(evType, fn, true);

				return false;

			}

			if (obj.attachEvent) {

				obj.attachEvent("on"+evType, fn);

				return false;

			}

		},

		removeEvent: function (obj, type, fn) {

			if (obj.detachEvent) {

				obj.detachEvent('on'+type, fn);

			} else {

				obj.removeEventListener(type, fn, false);

			}

		},

		 JSONscriptRequest: {

			scriptCounter: 1,

			 'init': function(fullUrl) {

				this.fullUrl = fullUrl;
				this.noCacheIE = '&noCacheIE=' + (new Date()).getTime();
				this.noCacheIE = '';
				this.headLoc = document.getElementsByTagName("head").item(0);
				this.scriptId = 'YJscriptId' + tuba2.commons.JSONscriptRequest.scriptCounter++;
				return this;

			},
			'buildScriptTag': function () {

				this.scriptObj = document.createElement("script");
				this.scriptObj.setAttribute("type", "text/javascript");
				this.scriptObj.setAttribute("src", this.fullUrl + this.noCacheIE);
				this.scriptObj.setAttribute("id", this.scriptId);

			},

			'removeScriptTag': function () {

				this.headLoc.removeChild(this.scriptObj);

			},

			'addScriptTag': function () {

				this.headLoc.appendChild(this.scriptObj);

			}

		},

		mouseCoords: function (ev){

			if(ev.pageX || ev.pageY){

				return {x:ev.pageX, y:ev.pageY};

			}
			return {

				x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
				y:ev.clientY + document.body.scrollTop  - document.body.clientTop

			};
		},

		getPosition: function (e) {

			var left = 0;
			var top  = 0;

			while (e.offsetParent){

				left += e.offsetLeft;
				top  += e.offsetTop;
				e     = e.offsetParent;

			}

			left += e.offsetLeft;
			top  += e.offsetTop;

			return {x:left, y:top};

		},

		mouseUp: function (ev) {

			ev = ev || window.event;
			var mousePos = this.mouseCoords(ev);

			if (thisObject.draggingVolume) {

				thisObject.draggingVolume = false;

			}

		},


		getMouseOffset: function (target, ev){

			ev = ev || window.event;

			var docPos    = this.getPosition(target);
			var mousePos  = this.mouseCoords(ev);
			return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};

		},

		get_html_translation_table: function  (table, quote_style) {
			// http://kevin.vanzonneveld.net
			// +   original by: Philip Peterson
			// *     example 1: get_html_translation_table('HTML_SPECIALCHARS');
			// *     returns 1: {'"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;'}

			var entities = {}, hash_map = {}, decimal = 0, symbol = '';
			var constMappingTable = {}, constMappingQuoteStyle = {};
			var useTable = {}, useQuoteStyle = {};

			// Translate arguments
			constMappingTable[0]      = 'HTML_SPECIALCHARS';
			constMappingTable[1]      = 'HTML_ENTITIES';
			constMappingQuoteStyle[0] = 'ENT_NOQUOTES';
			constMappingQuoteStyle[2] = 'ENT_COMPAT';
			constMappingQuoteStyle[3] = 'ENT_QUOTES';

			useTable       = !isNaN(table) ? constMappingTable[table] : table ? table.toUpperCase() : 'HTML_SPECIALCHARS';
			useQuoteStyle = !isNaN(quote_style) ? constMappingQuoteStyle[quote_style] : quote_style ? quote_style.toUpperCase() : 'ENT_COMPAT';

			if (useTable !== 'HTML_SPECIALCHARS' && useTable !== 'HTML_ENTITIES') {
				throw new Error("Table: "+useTable+' not supported');
				// return false;
			}

			entities['38'] = '&amp;';
			if (useTable === 'HTML_ENTITIES') {
				entities['160'] = '&nbsp;';
				entities['161'] = '&iexcl;';
				entities['162'] = '&cent;';
				entities['163'] = '&pound;';
				entities['164'] = '&curren;';
				entities['165'] = '&yen;';
				entities['166'] = '&brvbar;';
				entities['167'] = '&sect;';
				entities['168'] = '&uml;';
				entities['169'] = '&copy;';
				entities['170'] = '&ordf;';
				entities['171'] = '&laquo;';
				entities['172'] = '&not;';
				entities['173'] = '&shy;';
				entities['174'] = '&reg;';
				entities['175'] = '&macr;';
				entities['176'] = '&deg;';
				entities['177'] = '&plusmn;';
				entities['178'] = '&sup2;';
				entities['179'] = '&sup3;';
				entities['180'] = '&acute;';
				entities['181'] = '&micro;';
				entities['182'] = '&para;';
				entities['183'] = '&middot;';
				entities['184'] = '&cedil;';
				entities['185'] = '&sup1;';
				entities['186'] = '&ordm;';
				entities['187'] = '&raquo;';
				entities['188'] = '&frac14;';
				entities['189'] = '&frac12;';
				entities['190'] = '&frac34;';
				entities['191'] = '&iquest;';
				entities['192'] = '&Agrave;';
				entities['193'] = '&Aacute;';
				entities['194'] = '&Acirc;';
				entities['195'] = '&Atilde;';
				entities['196'] = '&Auml;';
				entities['197'] = '&Aring;';
				entities['198'] = '&AElig;';
				entities['199'] = '&Ccedil;';
				entities['200'] = '&Egrave;';
				entities['201'] = '&Eacute;';
				entities['202'] = '&Ecirc;';
				entities['203'] = '&Euml;';
				entities['204'] = '&Igrave;';
				entities['205'] = '&Iacute;';
				entities['206'] = '&Icirc;';
				entities['207'] = '&Iuml;';
				entities['208'] = '&ETH;';
				entities['209'] = '&Ntilde;';
				entities['210'] = '&Ograve;';
				entities['211'] = '&Oacute;';
				entities['212'] = '&Ocirc;';
				entities['213'] = '&Otilde;';
				entities['214'] = '&Ouml;';
				entities['215'] = '&times;';
				entities['216'] = '&Oslash;';
				entities['217'] = '&Ugrave;';
				entities['218'] = '&Uacute;';
				entities['219'] = '&Ucirc;';
				entities['220'] = '&Uuml;';
				entities['221'] = '&Yacute;';
				entities['222'] = '&THORN;';
				entities['223'] = '&szlig;';
				entities['224'] = '&agrave;';
				entities['225'] = '&aacute;';
				entities['226'] = '&acirc;';
				entities['227'] = '&atilde;';
				entities['228'] = '&auml;';
				entities['229'] = '&aring;';
				entities['230'] = '&aelig;';
				entities['231'] = '&ccedil;';
				entities['232'] = '&egrave;';
				entities['233'] = '&eacute;';
				entities['234'] = '&ecirc;';
				entities['235'] = '&euml;';
				entities['236'] = '&igrave;';
				entities['237'] = '&iacute;';
				entities['238'] = '&icirc;';
				entities['239'] = '&iuml;';
				entities['240'] = '&eth;';
				entities['241'] = '&ntilde;';
				entities['242'] = '&ograve;';
				entities['243'] = '&oacute;';
				entities['244'] = '&ocirc;';
				entities['245'] = '&otilde;';
				entities['246'] = '&ouml;';
				entities['247'] = '&divide;';
				entities['248'] = '&oslash;';
				entities['249'] = '&ugrave;';
				entities['250'] = '&uacute;';
				entities['251'] = '&ucirc;';
				entities['252'] = '&uuml;';
				entities['253'] = '&yacute;';
				entities['254'] = '&thorn;';
				entities['255'] = '&yuml;';
			}

			if (useQuoteStyle !== 'ENT_NOQUOTES') {
				entities['34'] = '&quot;';
			}
			if (useQuoteStyle === 'ENT_QUOTES') {
				entities['39'] = '&#39;';
			}
			entities['60'] = '&lt;';
			entities['62'] = '&gt;';


			// ascii decimals to real symbols
			for (decimal in entities) {
				if (entities[decimal]) {
					symbol = String.fromCharCode(decimal);
					hash_map[symbol] = entities[decimal];
				}
			}

			return hash_map;
		},


		htmlspecialchars: function  (string, quote_style) {
			// http://kevin.vanzonneveld.net
			// +   original by: Mirek Slugen
			// *     example 1: htmlspecialchars("<a href='test'>Test</a>", 'ENT_QUOTES');
			// *     returns 1: '&lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;'

			var hash_map = {}, symbol = '', tmp_str = '', entity = '';

			tmp_str = string.toString();

			if (false === (hash_map = this.get_html_translation_table('HTML_SPECIALCHARS', quote_style))) {
				return false;
			}

			//hash_map["'"] = '&#039;';
			for (symbol in hash_map) {
				if (hash_map[symbol]) {
					entity = hash_map[symbol];
					tmp_str = tmp_str.split(symbol).join(entity);
				}
			}

			return tmp_str;
		},

		xGetElementsByClassName2: function (c,p,f) {

		  var e, i, r = [];
		  if (!p) { p = document; }

		  if (document.evaluate) {

			var x = document.evaluate(".//*[contains(concat(' ', @class, ' '), ' " + c + " ')]", p, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);

			for (i = 0; i < x.snapshotLength; i++) {

			  r[r.length] = x.snapshotItem(i);

			  if (f) { f(x.snapshotItem(i)); }

			}

		  } else {

			var re = new RegExp("(^|\\s)"+c+"(\\s|$)");

			e = p.getElementsByTagName('*'); // not for IE5

			for (i = 0; i < e.length; ++i) {

			  if (re.test(e[i].className)) {

				r[r.length] = e[i];

				if (f) { f(e[i]); }

			  }

			}

		  }

		  return r;
		  
		}

	},

	vast: {

		flashEvent: function(obj) {

			switch (obj.event) {

				case 'complete':
				case 'error':

					if (document.getElementById('vast'))
						document.getElementById('vast').parentNode.removeChild(document.getElementById('vast'));
						
					if (document.getElementById('overlay'))
						document.getElementById('overlay').parentNode.removeChild(document.getElementById('overlay'));

					var today = new Date();
					today.setTime( today.getTime() );
					var expires = 1000 * 60 * tuba2.vast_time;
					var expires_date = new Date( today.getTime() + (expires) );

					document.cookie = tuba2.vast_name + "=" +escape( tuba2.vast_value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + "; path=/";

					// tuba2.player.volume(tuba2.flashvars.volume / 4);

					tuba2.player.server();


				break;

			}

			return false;

		}

	},


	radio: {
		
		parseArtists: function(e) {

			if (tuba2.flashvars.editTab == 0) {
			
				var list = document.getElementById('radio-artist-manager-list');
				var contener = tuba2.radio.artists;
				var action = 'usun_artyste';
				
			} else {
			
				var list = document.getElementById('radio-not-prefers-artist-manager-list');
				var contener = tuba2.radio.not_prefers_artists;			
				var action = 'przywroc_artyste';
				
			}

		
			while (list.lastChild) {
				list.removeChild(list.lastChild);
			}

			var s = '';

			for(var i in contener) {

				if (contener[i]) {

					s += '<li>';
					
					s += '<span>' +  contener[i].artist_name;
					s += '<button data-id="' + contener[i].artist_id + '" id="remove-artist-' + contener[i].artist_id + '" class="delete"></button></span>';
					
					s += '</li>';

				}
		
			}

			list.innerHTML = s;
			
			// list.scrollTop = list.scrollHeight;
			
			for(var j in contener) {
			
				document.getElementById('remove-artist-' + contener[j].artist_id).onclick = function(e) {
				
					var artist_id = this.getAttribute('data-id');
					var _action = action;
				
					tuba2.jx.load(tuba2.baseUrl + 'html/' + _action + '?radio-id=' + tuba2.flashvars.id + '&artist-id=' + artist_id, function(data) {
					
						if (data.result) {
												
							if (tuba2.flashvars.editTab == 0) {
							
								tuba2.radio.artists = data.artists;
								
							} else {
							
								tuba2.radio.not_prefers_artists = data.artists;
							
							}
							
							tuba2.radio.parseArtists();
						
						} else {
							
							tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);
						
						}
					
					}, 'json', 'POST');
				
				}
			
			}

		},
		
		parseSongs: function(e) {

			var list = document.getElementById('radio-song-manager-list');
			var contener = tuba2.radio.songs;			
			var action = 'przywroc_utwor';

			while (list.lastChild) {
				list.removeChild(list.lastChild);
			}

			var s = '';

			for(var i in contener) {

				if (contener[i]) {

					s += '<li>';
					
					s += '<span><em>' + contener[i].artist_name + ' - ' + contener[i].song_title;
					s += '</em><button data-id="' + contener[i].song_id + '" id="remove-song-' + contener[i].song_id + '" class="delete"></button></span>';
					
					s += '</li>';

				}
		
			}

			list.innerHTML = s;
			
			// list.scrollTop = list.scrollHeight;
			
			for(var j in contener) {
			
				document.getElementById('remove-song-' + contener[j].song_id).onclick = function(e) {
				
					var song_id = this.getAttribute('data-id');
					var _action = action;
				
					tuba2.jx.load(tuba2.baseUrl + 'html/' + _action + '?radio-id=' + tuba2.flashvars.id + '&song-id=' + song_id, function(data) {
					
						if (data.result) {
												
							tuba2.radio.songs = data.songs;
							
							tuba2.radio.parseSongs();
						
						} else {
							
							tuba2.commons.jsMessage(tuba2.messages.warning, data.error.message);
						
						}
					
					}, 'json', 'POST');
				
				}
			
			}

		}
		

	},

	player: (function() {

	// private area

		function _player(playerObjectId, buttonObjectId, progressId) {

			this.playerObjectId = playerObjectId;
			this.buttonObjectId = buttonObjectId;

			if (progressId !== '') {

				this.progressId = progressId;

			} else {

				this.progressId = false;

			}

			this.isPlaying = true;

		}

		_player.prototype.jsEvent = function(event, parameter) {

			var obj = {};
			obj.event  = event;
			obj.parameter = {};
			obj.parameter = parameter;


			try {

				document.getElementById(this.playerObjectId).jsEvent(obj);

			} catch(e) {
			}

		};

		_player.prototype.flashEvent = function(obj) {
		
			
		
			switch (obj.event) {

				case 'status':
					
					if (this.progressId) {

						if (document.getElementById(this.progressId)) {

							document.getElementById(this.progressId).firstChild.style.width = obj.parameter.position + '%';

						}
					}

					if (obj.parameter.song_id) {

						tuba2.player.currentSong = obj.parameter.song_id;						

					}

					if (obj.parameter.length) {

						tuba2.flashvars.gtotalTime = Math.round(obj.parameter.length);

					}


				break;

				case 'next':

					try {

						if (typeof tuba2.flashvars.gmaterialIdentifier != 'undefined') {

							gemiusStream.event(tuba2.flashvars.gplayerId, tuba2.flashvars.gmaterialIdentifier, tuba2.flashvars.gtotalTime, 'complete');

						}

					} catch(e) {
						//console.log(e);
					}

					tuba2.flashvars.gmaterialIdentifier = tuba2.flashvars.type + '_' + obj.parameter[0][2];

					tuba2.flashvars.gtotalTime = -1;

					tuba2.flashvars.song_id = obj.parameter[0][2];
					tuba2.flashvars.artist_id = obj.parameter[0][0];
					
					document.getElementById('play-stop').className = 'stop';

					tuba2.flashvars.gcustomPackage = [
						{name: 'RADIO', value: tuba2.flashvars.safe_name},
						{name: 'TYPE', value: tuba2.flashvars.gTYPE},
						{name: 'ARTIST', value: obj.parameter[0][1]},
						{name: 'SONG', value: obj.parameter[0][3]},
						{name: 'ALBUM', value: obj.parameter[0][4]}
					];

					if (tuba2.flashvars.type != 2) {

						try {

							gemiusStream.newStream(tuba2.flashvars.gplayerId, tuba2.flashvars.gmaterialIdentifier, tuba2.flashvars.gtotalTime, tuba2.flashvars.gcustomPackage, [], tuba2.flashvars.gIDENTIFIER, tuba2.flashvars.gHITCOLLECTOR);
							gemiusStream.event(tuba2.flashvars.gplayerId, tuba2.flashvars.gmaterialIdentifier, tuba2.flashvars.gtotalTime, 'playing');

						} catch(e) {
						}

					}

					tuba2.commons.refreshPlaylist(obj);

					if (tuba2.comments.offset === 0 && tuba2.flashvars.type !== 0) {

						tuba2.comments.getComments();

					}

				break;

			}

			return false;

		};


		_player.prototype.unmute = function() {

			var parameter = {};

			this.jsEvent('unmute', parameter);

			this.isMute = false;

			return false;
		};

		_player.prototype.setVolume = function(volume) {

			var parameter = {};
			parameter.volume = volume;

			try {

				this.jsEvent('volume', parameter);

			} catch(e) {
			}

			return false;
		};


		_player.prototype.mute = function() {

			var parameter = {};

			this.jsEvent('mute', parameter);

			this.isMute = true;

			return false;

		};
		
		_player.prototype.server = function() {

			var parameter = {};

			this.jsEvent('server', parameter);

			return false;

		};		

		_player.prototype.stop = function() {

			var parameter = {};

			this.jsEvent('stop', parameter);

			try {

				gemiusStream.event(tuba2.flashvars.gplayerId, tuba2.flashvars.gmaterialIdentifier, tuba2.flashvars.gtotalTime, 'stopped');

			} catch(e) {
			}

			this.isPlaying = false;

			return false;

		};

		_player.prototype.play = function() {

			var parameter = {};

			this.jsEvent('play', parameter);

			try {

				gemiusStream.event(tuba2.flashvars.gplayerId, tuba2.flashvars.gmaterialIdentifier, tuba2.flashvars.gtotalTime, 'playing');

			} catch(e) {
			}

			this.isPlaying = true;
			return false;

		};

		_player.prototype.reload = function() {

			var parameter = {};

			this.jsEvent('reload', parameter);

			this.isPlaying = true;
			return false;

		};

		_player.prototype.dontplay = function() {

			var parameter = {};

			this.jsEvent('dontplay', parameter);

			return false;
		};

	// end private area

    return {
        // public area

		server: function() {
		
			this.player.server();
		
		},
		
		volume: function(volume) {

			if (volume > this.volumeLength) {

				volume = this.volumeLength;

			}

			if (volume < 0) {

				volume = 0;

			}

			for(var j=0; j < this.volumeLength; j++) {

				if (document.getElementById(this.volumeId+'-'+j)) {

					document.getElementById(this.volumeId+'-'+j).className = '';

				}

			}

			for(j=0; j < volume; j++) {

				if (document.getElementById(this.volumeId+'-'+j)) {

					document.getElementById(this.volumeId+'-'+j).className = 'selected';

				}

			}

			this._volume = volume;

			return this.player.setVolume(parseInt(volume * 4, 10));

		},


		init: function(playerObjectId, buttonObjectId, volumeId, volumeLength, muteId, unmuteId, progressId) {

			var thisObject = this;

			this.player = new _player(playerObjectId, buttonObjectId, progressId);

			this.volumeId = volumeId;
			this._volume = parseInt(tuba2.flashvars.volume / 4,10);
			this.volumeLength = volumeLength;
			this.draggingVolume = false;

			thisObject.volume(this._volume);

			var t = '';

			switch(tuba2.flashvars.type) {

				case 0: t = 'SIMILAR ARTISTS'; break;
				case 1: t = 'USER RADIO'; break;
				case 2: t = 'STREAM'; break;
				case 3: t = 'THE BEST OF'; break;
				case 4: t = 'GENRE'; break;

			}

			tuba2.flashvars.gIDENTIFIER = "d7CadgLoo4nRzNXZaunGM_UC.qgF4fsD6VTAIt2W77L.B7";
			tuba2.flashvars.gHITCOLLECTOR = "http://spl.hit.gemius.pl";
			tuba2.flashvars.gplayerId = "player_" + Math.round(Math.random()*1000000);
			tuba2.flashvars.gtotalTime = -1;
			tuba2.flashvars.gTYPE = t;

			if (tuba2.flashvars.type == 2) {

				tuba2.flashvars.gcustomPackage = [
					{name: 'RADIO', value: tuba2.flashvars.safe_name},
					{name: 'TYPE', value: tuba2.flashvars.gTYPE}
				];

				tuba2.flashvars.gmaterialIdentifier = tuba2.flashvars.type + '_' + tuba2.flashvars.id;

				try {

					gemiusStream.newStream(tuba2.flashvars.gplayerId, tuba2.flashvars.gmaterialIdentifier, tuba2.flashvars.gtotalTime, tuba2.flashvars.gcustomPackage, [], tuba2.flashvars.gIDENTIFIER, tuba2.flashvars.gHITCOLLECTOR);
					gemiusStream.event(tuba2.flashvars.gplayerId, tuba2.flashvars.gmaterialIdentifier, tuba2.flashvars.gtotalTime, 'playing');

				} catch(e) {
				}				
				
			}			

			document.onmousemove = function(ev) {

					ev = ev || window.event;
					var mousePos = tuba2.commons.mouseCoords(ev);

					if (thisObject.draggingVolume) {

						p = tuba2.commons.getMouseOffset(thisObject.draggingVolume, ev);
						thisObject.volume(thisObject.startVolume + parseInt(p.x / 5,10));

					}

					return false;

			};

			document.onmouseup = function(ev) {

				ev = ev || window.event;
				var mousePos = tuba2.commons.mouseCoords(ev);

				if (thisObject.draggingVolume) {

					thisObject.draggingVolume = false;

					tuba2.jx.load(tuba2.baseUrl + 'html/zapisz_glosnosc?volume=' + parseInt(thisObject._volume * 4,10),

						function(data) {

							return false;

						},

					'json','POST');

				}

			};

			if (progressId !== '') {

				if (document.getElementById(progressId)) {

					document.getElementById(progressId).innerHTML = '<span></span>';

				}

			}





			document.getElementById(muteId).onclick = function () {

				tuba2.jx.load(tuba2.baseUrl + 'html/zapisz_glosnosc?volume=0',

					function(data) {

						return false;

					},

				'json','POST');

				return thisObject.volume(0);

			};




			document.getElementById(unmuteId).onclick = function () {

				tuba2.jx.load(tuba2.baseUrl + 'html/zapisz_glosnosc?volume=100',

					function(data) {

						return false;

					},

				'json','POST');

				return thisObject.volume(25);


			};




			document.getElementById(buttonObjectId).onclick = function () {

				if (thisObject.player.isPlaying) {

					thisObject.player.stop();
					this.className = 'play';
					this.title = tuba2.messages.play;

				} else {

					thisObject.player.play();
					this.className = 'stop';
					this.title = tuba2.messages.stop;

				}

				return false;

			};


			for(var i=0; i < volumeLength; i++) {

				document.getElementById(volumeId+'-'+i).volumeLength = volumeLength;
				document.getElementById(volumeId+'-'+i).volume = parseInt(i+1,10);
				document.getElementById(volumeId+'-'+i).fakeObj = thisObject;

				document.getElementById(volumeId+'-'+i).onmousemove = function(ev) {

					ev = ev || window.event;
					var mousePos = tuba2.commons.mouseCoords(ev);

					if (thisObject.draggingVolume) {

						p = tuba2.commons.getMouseOffset(thisObject.draggingVolume, ev);
						thisObject.volume(thisObject.startVolume + parseInt(p.x / 5,10));

					}

					return false;

				};




				document.getElementById(volumeId+'-'+i).onclick = function(ev) {

					thisObject.volume(this.volume);
					return false;

				};




				document.getElementById(volumeId+'-'+i).onmousedown = function(ev) {

					ev = ev || window.event;
					this.fakeObj.draggingVolume = this;

					this.fakeObj.volume(this.volume);
					this.fakeObj.startVolume = thisObject._volume;

					return false;


				};
			
			}			

		}

		// end public area
    };

})(),






























	autocomplete: (function() {

		// private area
		var KEY_BACKSPACE = 8;
		var KEY_DELETE = 46;
		var KEY_DOWN = 40;
		var KEY_UP = 38;
		var KEY_ESC = 27;
		var KEY_SPACE = 32;
		var KEY_ENTER = 13;

		function acomplete (search, resultObjectId, formularId, flashvars, selfObjectName) {

			this.inputQuery = document.getElementById(search);

			this.resultObject = document.getElementById(resultObjectId);
			this.selfObjectName = selfObjectName;

			this.cacheRequest = [];
			this.cacheSimilarRequest = [];
			this.formular = document.getElementById(formularId);

			this.minChar = 0;
			this.cursorPosition = 0;
			this.requestList = [];

			this.lastSearch = '';
			this.search = '';
			this.inputSerial = '';
			this.lastRespondCount = 0;
			this.readyToWrite = true;
			this.resultObjectVisible = false;
			this.flashvars = flashvars;

			if (this.inputQuery)
			this.inputQuery.setAttribute("autocomplete", "off");

			if (this.flashvars.id) {
				this.inputQuery.className = 'ready';
				this.inputQuery.value = tuba2.messages.radio_like + this.flashvars.name;
			} else {
				this.inputQuery.className = '';
				this.inputQuery.value = tuba2.autocompleteArtistsText;
			}
			this.firstTimeOnly = 0;

			this.inputQuery.fObj = this;
			this.inputQuery.disabled = false;

			var temp = this;

			tuba2.commons.addEvent(this.inputQuery, 'focus',function(event) { return temp.onfocus(event); } , false);
			tuba2.commons.addEvent(this.inputQuery, 'keydown',function(event) { return temp.onkeydown(event); } , false);
			tuba2.commons.addEvent(this.inputQuery, 'keyup',function(event) { return temp.onkeyup(event); } , false);
			tuba2.commons.addEvent(this.inputQuery, 'blur',function(event) { return temp.onblur(event); } , false);

			this.formular.onsubmit = function (event) { if (temp.search.length === 0 && temp.inputQuery.className !== 'read') { return false; } };
		}


		acomplete.prototype.makeChoice = function (query, id, serial) {

			this.inputQuery.value = query;
			
			tuba2.flashvars.queryID = id;
			
			this.inputSerial = serial;
			this.resultObjectHide();
			this.inputQuery.blur();

		};




		acomplete.prototype.resultObjectShow = function () {

			if (this.resultObjectVisible) { return false; }
			this.cursorPosition = 0;
			this.resultObjectVisible = true;
			this.showObject(this.resultObject);

		};




		acomplete.prototype.resultObjectHide = function () {

			this.cursorPosition = 0;
			this.resultObjectVisible = false;
			this.hideObject(this.resultObject);
			return true;

		};

		acomplete.prototype.traceCursor = function(extraP, fillInput) {

			if (typeof(extraP) == 'undefined' || extraP === 0) {

				extraP = this.cursorPosition;

			} else {

				this.cursorPosition = extraP;

			}


			if (extraP === 0) {

				this.inputQuery.value = this.search;

			}

			var trList = this.resultObject.getElementsByTagName('tr');

			for(var i=1;i<=trList.length;i++) {

				var td = trList[i-1].getElementsByTagName('td');

				if (i == extraP) {

					td[0].className = "selected";
					if (fillInput) { this.inputQuery.value = td[0].childNodes[0].nodeValue; }

				} else {

					td[0].className = "normal";

				}
			}
		};


		acomplete.prototype.onfocus = function(event) {

			if (this.search === '') {

				this.firstTimeOnly = 1;
				this.inputQuery.value = '';
				this.inputQuery.className = 'write';

			} else {

				this.resultObjectShow();

			}

		};


		acomplete.prototype.abortAllRequest = function () {

			for(var i in this.requestList)	{

				if (requestList[i]) {

					this.requestList[i].abort = true;
					this.requestList.splice(i);

				}

			}

		};

		acomplete.prototype.popAllRequest = function() {

			for(var i in this.requestList)	{

				if (this.requestList[i]) {

					this.requestList[i].abort = true;
					this.requestList.pop();

				}

			}

		};

		acomplete.prototype.onblur = function (event) {

			if (this.inputQuery.value === '') {

				this.inputQuery.className = '';

				if (this.flashvars.id) {

					this.inputQuery.className = 'ready';
					this.inputQuery.value = tuba2.messages.radio_like + this.flashvars.name;

				} else {

					this.inputQuery.value = tuba2.autocompleteArtistsText;

				}

			}

			return this.resultObjectHide();

		};

		acomplete.prototype.onkeydown = function(event) {

			this.inputSerial = '';

			switch(tuba2.commons.keyPress(event)) {

				case KEY_BACKSPACE:

						if (this.inputQuery.value.length == 1 || this.inputQuery.value.length === 0) {

							this.search = '';
							this.popAllRequest();
							this.resultObjectHide();

						}

					break;

				case KEY_DELETE:
						if (this.inputQuery.value.length === 0) {
							this.popAllRequest();
							this.resultObjectHide();
						}
					break;

				case KEY_DOWN:
						if (this.lastRespondCount > 0) {
							this.resultObjectShow();
							if (this.resultObjectVisible) {
								this.cursorPosition++;
								if (this.cursorPosition > this.lastRespondCount) { this.cursorPosition = 0; }
							}
							this.traceCursor(0, true);
						}

						return false;


				case KEY_UP:
						if (this.lastRespondCount > 0) {
							this.resultObjectShow();
							if (this.resultObjectVisible) {

								if (this.cursorPosition >= 1) {
									this.cursorPosition--;
								} else

								if (this.cursorPosition === 0) { this.cursorPosition = this.lastRespondCount; }

							}

							this.traceCursor(0, true);
						}

						return false;

				case KEY_ESC:
						this.inputQuery.value = this.search;
						this.popAllRequest();
						this.resultObjectHide();
					break;

				case KEY_ENTER:

						var r = this.lastRespond[this.cursorPosition - 1];

						this.makeChoice(r.keyword, r.id, r.action);

						this.popAllRequest();
						this.abortAllRequest();
						this.resultObjectHide();

						event.preventDefault();
						event.stopPropagation();						
						
					break;
			}

			return true;
		};




		acomplete.prototype.onkeyup = function (event) {

			var key = tuba2.commons.keyPress(event);

			if ( key == KEY_UP || key == KEY_DOWN ) { return false; }


			if (key == KEY_DELETE) {
				if (this.inputQuery.value.length === 0) {
					this.popAllRequest();
					this.resultObjectHide();
				}
			}

			if (this.inputQuery.value === '') {
				this.popAllRequest();
				return true;
			}

			this.search = this.inputQuery.value;
			
			tuba2.flashvars.queryID = '';
		
			this.position = 0;

			this.popAllRequest();

			var temp = this;

			if (this.readyToWrite) { setTimeout( function(){ temp.checkReadyState(); }, 100); }
			this.readyToWrite = false;

		};

		acomplete.prototype.checkReadyState = function () {

			this.readyToWrite = true;
			this.lastSearch = this.search;

			if (this.search.length >= this.minChar) {
					if (typeof this.cacheRequest[this.search.toString()] == 'object' && this.cacheRequest[this.search.toString()]) {
						this.lastRespond = this.cacheRequest[this.search.toString()];
						this.parseRequest();
					} else {
						this.requestList.unshift(new this.request(this));
					}
			}  else { this.hideObject(this.resultObject); }
		};


		acomplete.prototype.request = function(thisObject) {

			var req = tuba2.apiUrl + '_autocompleteArtists&format=jsonq&query=' + encodeURIComponent(thisObject.search) + '&callback='+ thisObject.selfObjectName +'.checkRequest' + (tuba2.tv ? '&tv=true' : '');

			tuba2.commons.JSONscriptRequest.init(req);
			tuba2.commons.JSONscriptRequest.buildScriptTag();
			tuba2.commons.JSONscriptRequest.addScriptTag();
		};


		acomplete.prototype.parseRequest = function () {

			this.lastRespondCount = this.lastRespond.length;

			var element = this.resultObject;
				while(element.hasChildNodes()) {
				  element.removeChild(element.firstChild);
				 }

			var ptable =  document.createElement("table");

			for (var i=0;i<this.lastRespond.length;i++) {

				var tr = ptable.insertRow(i);

				tr.fake = i;
				tr.name = this.lastRespond[i].id;
				tr.query = this.lastRespond[i].keyword;

				tr.fObj = this;
				tr.onmouseover = function() { tr.fObj.traceCursor(Number(this.fake)+1); };
				tr.onmousedown = function() { tr.fObj.makeChoice(this.query, this.name); };

				var tdchar = document.createElement("td");
				tdchar.appendChild(document.createTextNode((this.lastRespond[i].keyword).toString()));
				tr.appendChild(tdchar);

			}
			this.resultObject.appendChild(ptable);



			if (this.inputQuery.value !== '' && this.lastRespond.length !== 0) {
				this.showObject(this.resultObject);
			} else {
				this.hideObject(this.resultObject);
			}

		};



		acomplete.prototype.showObject = function(object) {
			if (object) {
				object.style.visibility = 'visible';
			}
		};


		acomplete.prototype.hideObject = function(object) {
			if (object) {
				object.style.visibility = 'hidden';
			}
		};

		// end private area

		return {
			// public area

			init: function(search, resultObjectId, formularId, flashvars, selfObjectName) {

				this.completer = new acomplete(search, resultObjectId, formularId, flashvars, selfObjectName);

				this.checkRequest = function(jData) {

					this.completer.lastRespond = jData.data;
					this.completer.cacheRequest[jData.query] = jData.data;
					this.completer.parseRequest();

				};

			}

			// end public area
		};
	})(),



	autocomplete_main: (function() {

		// private area
		var KEY_BACKSPACE = 8;
		var KEY_DELETE = 46;
		var KEY_DOWN = 40;
		var KEY_UP = 38;
		var KEY_ESC = 27;
		var KEY_SPACE = 32;
		var KEY_ENTER = 13;

		function acomplete(search, type, resultObjectId, formularId, flashvars, selfObjectName) {

			this.inputQuery = document.getElementById(search);

			this.inputType = document.getElementById(type);
			this.formular = document.getElementById(formularId);

			if(!document.getElementById(resultObjectId)){
				m = document.createElement('div');
				m.id = 'mask';
				d = document.createElement('div');
				d.id = resultObjectId;
				m.appendChild(d);
				document.body.appendChild(m);
				this.resultObject = d;
				this.mask = m;
			}


			this.selfObjectName = selfObjectName;

			this.actions = [];

			this.cacheRequest = [];
			this.cacheSimilarRequest = [];


			this.minChar = 0;
			this.cursorPosition = 0;
			this.requestList = [];

			this.lastSearch = '';
			this.search = '';
			this.type = '';
			this.inputSerial = '';
			this.lastRespondCount = 0;
			this.readyToWrite = true;
			this.resultObjectVisible = false;
			this.flashvars = flashvars;

			this.inputQuery.setAttribute("autocomplete", "off");

			if (this.flashvars.id) {
				this.inputQuery.className = 'ready';
				this.inputQuery.value = tuba2.messages.radio_like + this.flashvars.name;
			} else {
				this.inputQuery.className = '';
				this.inputQuery.value = tuba2.autocompleteText;
			}
			this.firstTimeOnly = 0;

			this.inputQuery.fObj = this;
			this.inputQuery.disabled = false;

			var temp = this;

			tuba2.commons.addEvent(this.inputQuery, 'focus',function(event) { return temp.onfocus(event); } , false);
			tuba2.commons.addEvent(this.inputQuery, 'keydown',function(event) { return temp.onkeydown(event); } , false);
			tuba2.commons.addEvent(this.inputQuery, 'keyup',function(event) { return temp.onkeyup(event); } , false);
			tuba2.commons.addEvent(this.inputQuery, 'blur',function(event) { return temp.onblur(event); } , false);

			this.formular.onsubmit = function (event) {

				if (temp.search.length === 0 && temp.inputQuery.className !== 'read') { return false; }

			};
		}


		acomplete.prototype.makeChoice = function (query, serial, action) {

			this.inputQuery.value = query;
			this.formular.action = 'http://' + location.host + '/' + action + '/' + query;
			this.inputSerial = serial;
			this.hideObject(this.resultObject);

			if (this.formular.submit.click) {
				this.formular.submit.click();
			}

		};




		acomplete.prototype.resultObjectShow = function () {
			if (this.resultObjectVisible) { return false; }
			this.cursorPosition = 0;
			this.resultObjectVisible = true;
			this.showObject(this.resultObject);
		};




		acomplete.prototype.resultObjectHide = function () {
			this.cursorPosition = 0;
			this.resultObjectVisible = false;
			this.hideObject(this.resultObject);
			return true;
		};

		acomplete.prototype.traceCursor = function(extraP, fillInput) {

			if (typeof(extraP) == 'undefined' || extraP === 0) {
				extraP = this.cursorPosition;
			} else {
				this.cursorPosition = extraP;
			}

			if (extraP === 0) {
				this.inputQuery.value = this.search;
			}

			var trList = this.resultObject.getElementsByTagName('tr');

			for(var i = 1; i <= trList.length; i++) {

				var td = trList[i-1].getElementsByTagName('td');

				if (i == extraP) {

					if(!trList[i-1].className.match(/\bselected\b/g)) trList[i-1].className += ' selected';

					if (fillInput) {
						this.inputQuery.value = td[1].childNodes[0].nodeValue;

					}
				} else {
					trList[i-1].className = trList[i-1].className.replace(/\bselected\b/g,'');
				}
			}
		};


		acomplete.prototype.onfocus = function(event) {

			if (this.search === '') {
				this.firstTimeOnly = 1;
				this.inputQuery.value = '';
				this.inputQuery.className = 'write';
			} else { this.showObject(this.resultObject); }
		};


		acomplete.prototype.abortAllRequest = function () {
			for(var i in this.requestList)	{
				if (requestList[i]) {
					this.requestList[i].abort = true;
					this.requestList.splice(i);
				}
			}
		};

		acomplete.prototype.popAllRequest = function() {
			for(var i in this.requestList)	{
				if (this.requestList[i]) {
					this.requestList[i].abort = true;
					this.requestList.pop();
				}
			}
		};

		acomplete.prototype.onblur = function (event) {

			if (this.inputQuery.value === '') {
				this.inputQuery.className = '';

				if (this.flashvars.id) {
					this.inputQuery.className = 'ready';
					this.inputQuery.value = tuba2.messages.radio_like + this.flashvars.name;
				} else {
					this.inputQuery.value = tuba2.autocompleteText;
				}
			}
			return this.hideObject(this.resultObject);
		};

		acomplete.prototype.onkeydown = function(event) {

			this.inputSerial = '';

			switch(tuba2.commons.keyPress(event)) {
				case KEY_BACKSPACE:
						if (this.inputQuery.value.length == 1 || this.inputQuery.value.length === 0) {
							this.search = '';
							this.popAllRequest();
							this.resultObjectHide();
						}
					break;

				case KEY_DELETE:
						if (this.inputQuery.value.length === 0) {
							this.popAllRequest();
							this.resultObjectHide();
						}
					break;

				case KEY_DOWN:
						if (this.lastRespondCount > 0) {
							this.resultObjectShow();
							if (this.resultObjectVisible) {
								this.cursorPosition++;
								if (this.cursorPosition > this.lastRespondCount) { this.cursorPosition = 0; }
							}
							this.traceCursor(0, true);
						}

						return false;


				case KEY_UP:
						if (this.lastRespondCount > 0) {
							this.resultObjectShow();
							if (this.resultObjectVisible) {

								if (this.cursorPosition >= 1) {
									this.cursorPosition--;
								} else

								if (this.cursorPosition === 0) { this.cursorPosition = this.lastRespondCount; }

							}

							this.traceCursor(0, true);
						}

						return false;

				case KEY_ESC:
						this.inputQuery.value = this.search;
						this.popAllRequest();
						this.resultObjectHide();
					break;

					case KEY_ENTER:

						var r = this.lastRespond[this.cursorPosition - 1];

						this.makeChoice(r.keyword, '', r.action);

						this.popAllRequest();
						this.abortAllRequest();
						this.resultObjectHide();

						event.preventDefault();
						event.stopPropagation();

						return false;
					break;
			}

			return true;
		};




		acomplete.prototype.onkeyup = function (event) {

			var key = tuba2.commons.keyPress(event);

			if ( key == KEY_UP || key == KEY_DOWN ) { return false; }


			if (key == KEY_DELETE) {
				if (this.inputQuery.value.length === 0) {
					this.popAllRequest();
					this.resultObjectHide();
				}
			}

			if (this.inputQuery.value === '') {
				this.popAllRequest();
				return true;
			}

			this.search = this.inputQuery.value;
			this.position = 0;

			this.popAllRequest();

			var temp = this;

			if (this.readyToWrite) { setTimeout( function(){ temp.checkReadyState(); }, 100); }
			this.readyToWrite = false;

		};

		acomplete.prototype.checkReadyState = function () {

			this.readyToWrite = true;
			this.lastSearch = this.search;

			if (this.search.length >= this.minChar) {

					if (typeof this.cacheRequest[this.search.toString()] == 'object' && this.cacheRequest[this.search.toString()]) {
						this.lastRespond = this.cacheRequest[this.search.toString()];
						this.parseRequest();
					} else {
						this.requestList.unshift(new this.request(this));
					}

			}  else { this.hideObject(this.resultObject); }
		};


		acomplete.prototype.request = function(thisObject) {

			var req = tuba2.apiUrl + '_cache_autocomplete&format=jsonq&query=' + encodeURIComponent(thisObject.search.toString()) + '&callback='+ thisObject.selfObjectName +'.checkRequest' + (tuba2.tv ? '&tv=true' : '');

			tuba2.commons.JSONscriptRequest.init(req);
			tuba2.commons.JSONscriptRequest.buildScriptTag();
			tuba2.commons.JSONscriptRequest.addScriptTag();
		};


		acomplete.prototype.parseRequest = function () {

			this.lastRespondCount = this.lastRespond.length;

			var element = this.resultObject;
				while(element.hasChildNodes()) {
				  element.removeChild(element.firstChild);
				 }
			l = 12;

			var o = [], a = [];

			for (var i = 0; i < this.lastRespond.length; i++) {


				switch (parseInt(this.lastRespond[i].type)) {

					case 0:

						this.lastRespond[i].action = 'radio-internetowe';
						this.lastRespond[i].box = 'Artyści';
						this.lastRespond[i].label = 'oraz podobni artyści';
						this.lastRespond[i].order = 2;
					break;

					case 1:
						this.lastRespond[i].action = 'radio/' + this.lastRespond[i].user_login + '/' + this.lastRespond[i].pid;
						this.lastRespond[i].box = 'Radia';
						this.lastRespond[i].label = 'radio użytkownika: ' + this.lastRespond[i].user_login;
						this.lastRespond[i].order = 4;
					break;

					case 2:
						this.lastRespond[i].action = 'stacja-radiowa';
						this.lastRespond[i].box = 'Radia';
						this.lastRespond[i].label = 'radio tuby';
						this.lastRespond[i].order = 0;
					break;

					case 3:
						this.lastRespond[i].action = 'the+best+of';
						this.lastRespond[i].box = 'Artyści';
						this.lastRespond[i].label = 'wszystkie utwory';
						this.lastRespond[i].order = 1;
					break;

					case 4:
						this.lastRespond[i].action = 'muzyka';
						this.lastRespond[i].box = 'Gatunki';
						this.lastRespond[i].label = 'radio gatunkowe';
						this.lastRespond[i].order = 3;
					break;

				}


				if(typeof o[this.lastRespond[i].type] == 'undefined')o[this.lastRespond[i].type] = [];

				o[this.lastRespond[i].type].push(this.lastRespond[i]);

			}

			for (var i = 0, l = 0 , t = 0; i < this.lastRespond.length && l < 12; t++) {
				if(t > 4){
					t = 0;
					i++;
				}
				if(typeof o[t] != 'undefined' && typeof o[t][i] != 'undefined'){
					a[l] = o[t][i];
					l++;
				}
			}



			a.sort(function(a, b) {
				a = a['order'], b = b['order'];
				return a > b ? 1 : a < b ? -1 : 0;
			});



			this.lastRespond = a;

			var ptable =  document.createElement("table");

			for (var i=0;i < this.lastRespond.length;i++) {

				var tr = ptable.insertRow(i);
				if(i%2 != 0) tr.className = 'odd';
				if(i+1 == this.lastRespond.length) tr.className += ' last';

				tr.fake = i;
				tr.name = this.lastRespond[i].id;
				tr.query = this.lastRespond[i].keyword;
				tr.type = this.lastRespond[i].type;

				tr.action = this.lastRespond[i].action;
				tr.box = this.lastRespond[i].box;
				i > 0 ? tr.lastBox = this.lastRespond[i-1].box : tr.lastBox = '';

				tr.label = this.lastRespond[i].label;

				tr.fObj = this;
				tr.onmouseover = function() { tr.fObj.traceCursor(Number(this.fake)+1); };
				tr.onmousedown = function() { tr.fObj.makeChoice(this.query, this.name, this.action); };


				var td = tr.insertCell(0);
				td.className = 'box';
				if(tr.box != tr.lastBox){
					td.innerHTML = tr.box;
				}

				td = tr.insertCell(1);
				td.className = 'query';
				td.innerHTML = tr.query;

				td = tr.insertCell(2);
				td.className = 'label';
				td.innerHTML = tr.label;


			}
			this.resultObject.style.backgroundImage = '';
			this.resultObject.appendChild(ptable);



			if (this.inputQuery.value !== '' && this.lastRespond.length !== 0) {
				this.showObject(this.resultObject);
			} else {
				this.hideObject(this.resultObject);
			}

		};



		acomplete.prototype.showObject = function(object) {
			if (object) {

				//for(var i = 0, a = tuba2.commons.xGetElementsByClassName2('canvas'); i < a.length ; i++)  a[i].className += ' blur';
				//if(!trList[i-1].className.match(/\bselected\b/g)) trList[i-1].className += ' selected';
				object.style.visibility = 'visible';
				this.mask.style.visibility = 'visible';
				document.getElementById('canvas').className = 'blur canvas';

			}
		};


		acomplete.prototype.hideObject = function(object) {
			if (object) {
				//for(var i = 0, xxx = tuba2.commons.xGetElementsByClassName2('canvas'); i < xxx.length ; i++)xxx[i].className = xxx[i].className.replace(/\b blur\b/g,'');
				//document.getElementById('canvas').className = document.getElementById('canvas').className.replace(/\b blur\b/g,'');


				object.style.visibility = 'hidden';
				this.mask.style.visibility = 'hidden';
				document.getElementById('canvas').className = 'canvas';

			}
		};

		// end private area

		return {
			// public area

			init: function(search, type, resultObjectId, formularId, flashvars, selfObjectName) {

				this.completer = new acomplete(search, type, resultObjectId, formularId, flashvars, selfObjectName);

				this.checkRequest = function(jData) {

					this.completer.lastRespond = jData.data;
					this.completer.cacheRequest[jData.query] = jData.data;
					this.completer.parseRequest();

				};

			}

			// end public area
		};
	})(),







	stacja: {

		parse: function(jData) {

			var data = jData.data;

			if (data) {

				var obj = {};
				obj.parameter = [];

				for (var i=0;i<6;i++) {

					if (data[i]) {
					
						obj.parameter[i] = [];
						obj.parameter[i][0] = '';
						obj.parameter[i][1] = data[i].artist_name;
						obj.parameter[i][2] = '';
						obj.parameter[i][3] = data[i].song_title;
						obj.parameter[i][4] = data[i].album_title;
						obj.parameter[i][5] = data[i].album_image;
						obj.parameter[i][6] = '';
						obj.parameter[i][7] = data[i].artist_link;
					
					}

				}

				tuba2.commons.refreshPlaylist(obj);

			}

		},


		init: function() {

			tuba2.comments.getComments();

			if ((tuba2.onStationInterval < 20000) || typeof(tuba2.onStationInterval) == 'undefined') { tuba2.onStationInterval = 20000; }
			if ((tuba2.commentsInterval < 60000) || typeof(tuba2.commentsInterval) == 'undefined') { tuba2.commentsInterval = 300000; }

			setInterval(function() {

				var req = tuba2.onairUrl + 'api/_cache_onStation?resize=69&id=' + encodeURIComponent(tuba2.flashvars.id) + '&format=jsonq&callback=tuba2.stacja.parse';

				tuba2.commons.JSONscriptRequest.init(req);
				tuba2.commons.JSONscriptRequest.buildScriptTag();
				tuba2.commons.JSONscriptRequest.addScriptTag();

				return false;

			}, tuba2.onStationInterval);

			setInterval(function() {

				tuba2.comments.getComments();

			}, tuba2.commentsInterval);
			
			document.getElementById('play-stop').className = 'stop';

		}

},







ajaxUpload: function (form) {

	var detectWebKit = RegExp(" AppleWebKit/").test(navigator.userAgent);

	form = typeof (form) == "string" ? document.getElementById(form) : form;

	var iframe = document.createElement("iframe");
	iframe.setAttribute("id","ajax-temp");
	iframe.setAttribute("name","ajax-temp");
	iframe.setAttribute("width","0");
	iframe.setAttribute("height","0");
	iframe.setAttribute("border","0");
	iframe.setAttribute("style","width: 0; height: 0; border: none;");

	form.parentNode.appendChild(iframe);

	window.frames['ajax-temp'].name="ajax-temp";

	var s = document.domain;

	document.domain = tuba2.domain;

	var doUpload = function() {

		tuba2.commons.removeEvent(document.getElementById('ajax-temp'),"load", doUpload);

		if (detectWebKit) {

			document.getElementById('ajax-temp').parentNode.removeChild(document.getElementById('ajax-temp'));

		} else {

			setTimeout(function(){ document.getElementById('ajax-temp').parentNode.removeChild(document.getElementById('ajax-temp')); }, 250);

		}

    };

	tuba2.commons.addEvent(document.getElementById('ajax-temp'),"load", doUpload);

	form.setAttribute("target","ajax-temp");

	form.setAttribute("method","post");
	form.setAttribute("enctype","multipart/form-data");
	form.setAttribute("encoding","multipart/form-data");
	form.submit();

},












jx: {
	//Create a xmlHttpRequest object - this is the constructor.
	getHTTPObject: function() {
		var http = false;
		//Use IE's ActiveX items to load the file.
		if(typeof ActiveXObject != 'undefined') {
			try {http = new ActiveXObject("Msxml2.XMLHTTP");}
			catch (e) {
				try {http = new ActiveXObject("Microsoft.XMLHTTP");}
				catch (E) {http = false;}
			}
		//If ActiveX is not available, use the XMLHttpRequest of Firefox/Mozilla etc. to load the document.
		} else if (window.XMLHttpRequest) {
			try {http = new XMLHttpRequest();}
			catch (e) {http = false;}
		}
		return http;
	},

	// This function is called from the user's script.
	//Arguments -
	//	url	- The url of the serverside script that is to be called. Append all the arguments to
	//			this url - eg. 'get_data.php?id=5&car=benz'
	//	callback - Function that must be called once the data is ready.
	//	format - The return type for this function. Could be 'xml','json' or 'text'. If it is json,
	//			the string will be 'eval'ed before returning it. Default:'text'
	//	method - GET or POST. Default 'GET'
	load: function (url,callback,format,method, opt) {
		var http = this.init(); //The XMLHttpRequest object is recreated at every call - to defeat Cache problem in IE
		if(!http||!url) { return; }
		//XML Format need this for some Mozilla Browsers
		if (http.overrideMimeType) { http.overrideMimeType('text/xml'); }

		if(!method) { method = "GET"; }//Default method is GET
		if(!format) { format = "text"; }//Default return type is 'text'
		if(!opt) { opt = {}; }
		format = format.toLowerCase();
		method = method.toUpperCase();

		//Kill the Cache problem in IE.
		var now = "uid=" + new Date().getTime();
		url += (url.indexOf("?")+1) ? "&" : "?";
		url += now;

		var parameters = null;

		if (method=="POST") {
			var parts = url.split("?");
			url = parts[0];
			parameters = parts[1];
		}
		http.open(method, url, true);

		if(method=="POST") {
			http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			http.setRequestHeader("Content-length", parameters.length);
			http.setRequestHeader("Connection", "close");
		}

		var ths = this;// Closure
		if(opt.handler) { //If a custom handler is defined, use it
			http.onreadystatechange = function() { opt.handler(http); };
		} else {
			http.onreadystatechange = function () {//Call a function when the state changes.
				if (http.readyState == 4) {//Ready State will be 4 when the document is loaded.
					if(http.status == 200) {

						var result = "";

						if(http.responseText) { result = http.responseText; }

						//If the return is in JSON format, eval the result before returning it.
						if(format.charAt(0) == "j") {
							//\n's in JSON string, when evaluated will create errors in IE
							result = result.replace(/[\n\r]/g,"");
							result = eval('('+result+')');

						} else if(format.charAt(0) == "x") { //XML Return
							result = http.responseXML;
						}

						//Give the data to the callback function.
						if(callback) { callback(result); }
					} else {
						if(opt.loadingIndicator) { document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator); } //Remove the loading indicator
						if(opt.loading) { document.getElementById(opt.loading).style.display="none"; } //Hide the given loading indicator.

						if(typeof(error) != 'undefined') { error(http.status); }
					}
				}
			};
		}
		http.send(parameters);
	},
	bind: function(user_options) {
		var opt = {
			'url':'',	//URL to be loaded
			'onSuccess':false,	//Function that should be called at success
			'onError':false,	//Function that should be called at error
			'format':"text",	//Return type - could be 'xml','json' or 'text'
			'method':"GET",		//GET or POST
			'update':"",		//The id of the element where the resulting data should be shown.
			'loading':"",		//The id of the loading indicator. This will be set to display:block when the url is loading and to display:none when the data has finished loading.
			'loadingIndicator':"" //HTML that would be inserted into the document once the url starts loading and removed when the data has finished loading. This will be inserted into a div with class name 'loading-indicator' and will be placed at 'top:0px;left:0px;'
		};
		for(var key in opt) {
			if(user_options[key]) {//If the user given options contain any valid option, ...
				opt[key] = user_options[key];// ..that option will be put in the opt array.
			}
		}

		if(!opt.url) { return; } //Return if a url is not provided

		var div = false;
		if(opt.loadingIndicator) { //Show a loading indicator from the given HTML
			div = document.createElement("div");
			div.setAttribute("style","position:absolute;top:0px;left:0px;");
			div.setAttribute("class","loading-indicator");
			div.innerHTML = opt.loadingIndicator;
			document.getElementsByTagName("body")[0].appendChild(div);
			this.opt.loadingIndicator=div;
		}
		if(opt.loading) { document.getElementById(opt.loading).style.display="block"; } //Show the given loading indicator.

		this.load(opt.url,function(data){
			if(opt.onSuccess) { opt.onSuccess(data); }
			if(opt.update) { document.getElementById(opt.update).innerHTML = data; }

			if(div) { document.getElementsByTagName("body")[0].removeChild(div); } //Remove the loading indicator
			if(opt.loading) { document.getElementById(opt.loading).style.display="none"; } //Hide the given loading indicator.
		},opt.format,opt.method, opt);
	},
	init : function() {return this.getHTTPObject();}
}


}




tuba2.commons.addEvent(window, 'load', function () {

	tuba2.commons.preInit();
	
	tuba2.commons.fbInit();

} );


window.onunload = function()  {};











var banServerFile = 'http://adp.adview.pl/ad/';
var banServerJS = 'http://ad.adview.pl/';



var banViewedXxByPoz = '';
var xxyEcom = '';

function getBanObj(obj) {
	if (document.all) { return eval('document.all.'+obj); } else
	if (document.getElementById) { return eval("document.getElementById('"+obj+"')"); }
}

function putBan(typR){
	var typ=typR;
	if (typR==481) { typ=48; }

	var isRotType = false;
	if (typeof banRotXxByPoz != "undefined") {
                if (typeof banRotXxByPoz[typ] != "undefined") {
                        isRotType = true;
                }
        }

	if (!isRotType) {
		try {
			if (typeof banXxByPoz[typ] != "undefined"){
				document.write('<scr'+'ipt type="text/javascript" src="'+banServerFile+'GetBanFile?bxx='+banXxByPoz[typ]+'"><\/script>');
				banViewedXxByPoz+=banXxByPoz[typ]+',';
			} else if(typR==48) {
				document.write('<div class="bb2" align="right"><a class="bb48r" href="http://serwisy.gazeta.pl/linki/0,52960.html" >+ dodaj swoją reklamę </a></div>');
		}
		} catch(e) {
		}
	} else {
	            if (getBanObj("banP" + typ)) { getBanObj("banP" + typ).style.display="block";  }

                document.write('<div id="rot' + banXxByPoz[typ] + '"></div>');
                document.write('<div id="rotBottom' + banXxByPoz[typ] + '" style="text-align:right; margin-bottom:5px; "><img src="http://bi.gazeta.pl/i/reklama/rot/strzalki_napis.gif" style="border:0;vertical-align:middle;padding-right:5px;"/><a href="javascript:backBan(' + typ + ');"><img src="http://bi.gazeta.pl/i/reklama/rot/strzalki_left.gif" style="border:0;vertical-align:middle;"/></a><a href="javascript:forwardBan(' + typ + ')"><img src="http://bi.gazeta.pl/i/reklama/rot/strzalki_right.gif" style="border:0;vertical-align:middle;"/></a></div>');
                if (banXxByPoz[typ]){
                        banViewedXxByPoz+=banXxByPoz[typ]+',';
                }
                drawBanner(typ);
                startRotate(typ);
	}
}


function countBan(dx){

	if (banViewedXxByPoz!=='') {

		document.write('<scr'+'ipt type="text/javascript" src="'+banServer+'CountBan?dx='+dx+'&bxx='+banViewedXxByPoz+'&banKey='+banKey+'&xxyEcom='+xxyEcom+'"><\/script>');

	}
}


function banDoIt(txt) {

	eval(unescape(eval(txt)));

}

if (typeof banRotXxByPoz != "undefined") {

    document.write('<scr'+'ipt type="text/javascript" src="'+banServerJS+'info/ban/silnikRot.js"><\/script>');

}


































function gemius_parameters() {
	var d=document;
	var href= d.location.href;
	var ref;
	var f=0;
	var fv='-';
	if (d.referrer) { ref = d.referrer; } else { ref=''; }
	if (typeof Error!='undefined') {
		var fo;
		eval('try { f=(d==top.document)?1:2; if (typeof top.document.referrer=="string") { ref=top.document.referrer } } catch(e) {f=3;}');
		eval('try { fv=navigator.plugins["Shockwave Flash"].description; } catch (e) {}');
		eval('if (typeof ActiveXObject!="undefined") { try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch(e) { try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); fv="X"; fo.AllowScriptAccess="always"; } catch(e) { if (fv=="X") { fv="WIN 6,0,20,0"; }} try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch(e) {} } if ((fv=="-" || fv=="X") && fo) { fv=fo.GetVariable("$version"); }}');
	}
	var url='&fr='+f+'&fv='+escape(fv)+'&tz='+(new Date()).getTimezoneOffset()+'&href='+escape(href.substring(0,499))+'&ref='+escape(ref.substring(0,499));
	if (screen) {
		var s=screen;
		if (s.width)  { url+='&screen='+s.width+'x'+s.height; }
		if (s.colorDepth) { url+='&col='+s.colorDepth; }
	}
	return url;
}

window.pp_gemius_params = gemius_parameters();

function gemius_add_onload_event(obj,fn) {
	if (obj.attachEvent) {
		obj.attachEvent('onload', fn);
	} else if(obj.addEventListener) {
		obj.addEventListener('load', fn, false);
	}

}

function gemius_append_script(xp_url) {
	if (typeof Error!='undefined') {
		eval('try { xp_javascript=document.createElement("script"); xp_javascript.src=xp_url; xp_javascript.type="text/javascript"; xp_javascript.defer=true; document.body.appendChild(xp_javascript); } catch(e) {}');
	}
}

function gemius_obj_loaded() {
	window.pp_gemius_loaded+=1;
	if (window.pp_gemius_loaded==2 && window.pp_gemius_image.width && window.pp_gemius_image.width>1) {
		gemius_append_script(window.pp_gemius_script);
	}
}

function pp_gemius_timer() {
	window.pp_gemius_timer_image = new Image();
	window.pp_gemius_timer_image.src = window.pp_gemius_host+(new Date()).getTime()+'/dot.gif?l=36'+window.pp_gemius_time_id+window.pp_gemius_params;
}

var pp_gemius_proto = (document.location && document.location.protocol && document.location.protocol=='https:')?'https://':'http://';
if (typeof pp_gemius_hitcollector == 'undefined') {
	if (typeof gemius_hitcollector != 'undefined') {
		pp_gemius_hitcollector = gemius_hitcollector;
	} else {
		pp_gemius_hitcollector = 'gazeta.hit.gemius.pl';
	}
}
var pp_gemius_host = pp_gemius_proto+pp_gemius_hitcollector+'/_';
var pp_gemius_sv;

if (typeof pp_gemius_nhit == 'undefined') {
	if (typeof pp_gemius_identifier == 'undefined') {
		if (typeof gemius_identifier != 'undefined') {
			pp_gemius_identifier = gemius_identifier;
			gemius_identifier = 'USED_'+gemius_identifier;
		} else {
			pp_gemius_identifier = '';
		}
	}


	if (typeof window.pp_gemius_cnt != 'undefined') {
		if (typeof window.pp_gemius_images == 'undefined') {
			window.pp_gemius_images = [];
		}
		var gemius_l = window.pp_gemius_images.length;
		window.pp_gemius_images[gemius_l]=new Image();
		window.pp_gemius_images[gemius_l].src = pp_gemius_host+(new Date()).getTime()+'/redot.gif?l=33&id=ERR_'+pp_gemius_identifier.replace(/id=/,'id=ERR_')+window.pp_gemius_params;
	} else {
		if (typeof pp_gemius_time_identifier != 'undefined' && typeof window.pp_gemius_time_id == 'undefined') {
			window.pp_gemius_time_id = '&id='+pp_gemius_time_identifier;
			window.pp_gemius_host = pp_gemius_host;
			setInterval('pp_gemius_timer()',60*1000);
			pp_gemius_sv=35;
		} else {
			window.pp_gemius_time_id = '';
			pp_gemius_sv=31;
		}
		window.pp_gemius_image = new Image();
		if (typeof pp_gemius_mode == 'undefined') {
			window.pp_gemius_loaded = 0;
			window.pp_gemius_script = pp_gemius_host+(new Date()).getTime()+'/pp.js?id='+pp_gemius_identifier;
			gemius_add_onload_event(window,gemius_obj_loaded);
			gemius_add_onload_event(window.pp_gemius_image,gemius_obj_loaded);
			pp_gemius_sv-=1;
		}
		window.pp_gemius_image.src = pp_gemius_host+(new Date()).getTime()+'/rexdot.gif?l='+pp_gemius_sv.toString()+'&id='+pp_gemius_identifier+window.pp_gemius_time_id+window.pp_gemius_params;
		window.pp_gemius_cnt = 1;
	}
	pp_gemius_identifier = 'USED_'+pp_gemius_identifier;
}

function pp_gemius_hit_int(list,rfrom,rto) {
	var gu = pp_gemius_host+(new Date()).getTime()+'/redot.gif?l=32';
	if (typeof window.xgemius_prot_cnt == 'undefined') {
		window.xgemius_prot_cnt=0;
	}
	if (typeof xgemius_prot_cnt == 'undefined') {
		xgemius_prot_cnt=0;
	}
	if (window.xgemius_prot_cnt<=xgemius_prot_cnt) {
		go=1;
		window.xgemius_prot_cnt++;
	} else {
		go=0;
	}
	xgemius_prot_cnt++;
	for (var i=rfrom ; i<rto ; i++) {
		gu += '&id='+list[i];
	}
	gu += window.pp_gemius_params;
	if (typeof window.gemius_hit_images == 'undefined') {
		window.gemius_hit_images = [];
	}
	var gl = window.gemius_hit_images.length;
	window.gemius_hit_images[gl]=new Image();
	if (go) {
		window.gemius_hit_images[gl].src = gu;
	} else {
		window.gemius_hit_images[gl].src = gu.replace(/id=/,'id=DBL_');
	}
}

function pp_gemius_hit() {
	for (i=0 ; i<arguments.length ; i+=5) {
		if (i+5<arguments.length) {
			pp_gemius_hit_int(arguments,i,i+5);
		} else {
			pp_gemius_hit_int(arguments,i,arguments.length);
		}
	}
}

if (typeof gemius_hit != 'function') {
	gemius_hit=pp_gemius_hit;
}


















































var gsm_gemius_proto = (document.location && document.location.protocol && document.location.protocol=='https:')?'https://':'http://';
if (typeof gsm_gemius_hitcollector == 'undefined') {
	gsm_gemius_hitcollector = 'pro.hit.gemius.pl';
}
var gsm_gemius_host = gsm_gemius_proto+gsm_gemius_hitcollector+'/_';

function gsm_gemius_parameters_fn() {
	var d=document;
	var href=new String(d.location.href);
	var ref;
	var f=0;
	var fv='-';
	if (d.referrer) { ref=new String(d.referrer); } else { ref=''; }
	if (typeof Error!='undefined') {
		var fo;
		eval('try { f=(d==top.document)?1:2; if (typeof top.document.referrer=="string") { ref=top.document.referrer } } catch(e) {f=3;}');
		eval('try { fv=navigator.plugins["Shockwave Flash"].description; } catch (e) {}');
		eval('if (typeof ActiveXObject!="undefined") { try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch(e) { try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); fv="X"; fo.AllowScriptAccess="always"; } catch(e) { if (fv=="X") { fv="WIN 6,0,20,0"; }} try { fo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch(e) {} } if ((fv=="-" || fv=="X") && fo) { fv=fo.GetVariable("$version"); }}');
	}
	var url='&fr='+f+'&fv='+escape(fv)+'&tz='+(new Date()).getTimezoneOffset()+'&href='+escape(href.substring(0,1024))+'&ref='+escape(ref.substring(0,1024));
	if (screen) {
		var s=screen;
		if (s.width) url+='&screen='+s.width+'x'+s.height;
		if (s.colorDepth) url+='&col='+s.colorDepth;
	}
	return url;
}

var gsm_gemius_parameters = gsm_gemius_parameters_fn();

function gsm_gemius_escape(str,limit) {
	function Hex(n) {
		var hexMap = "0123456789ABCDEF";
		return hexMap.charAt(n>>4)+hexMap.charAt(n&0xF);
	}
	var c,s,uc,ul;
	var dst = "";
	for (var i=0 ; i<str.length ; i++) {
		c = str.charCodeAt(i);
		if ((c>=0xDC00)&&(c<0xE000)) continue;
		if ((c>=0xD800)&&(c<0xDC00)) {
			i++;
			if (i>=str.length) continue;
			s = str.charCodeAt(i);
			if ((s<0xDC00)||(s>=0xE000)) continue;
			c = ((c-0xD800)<<10)+(s-0xDC00)+0x10000;
		}
		if (c<0x80) {
			uc = escape(String.fromCharCode(c)).replace(/\+/g,"%2B").replace(/\//g,"%2F");
			if (c<=0x20) {
				ul=3;
			} else {
				ul=1;
			}
		} else if (c<0x800) {
			uc = "%"+Hex((c>>6)|0xC0)+"%"+Hex((c&0x3F)|0x80);
			ul = 2;
		} else if (c<0x10000) {
			uc = "%"+Hex((c>>12)|0xE0)+"%"+Hex(((c>>6)&0x3F)|0x80)+"%"+Hex((c&0x3F)|0x80);
			ul = 3;
		} else if (c<0x200000) {
			uc = "%"+Hex((c>>18)|0xF0)+"%"+Hex(((c>>12)&0x3F)|0x80)+"%"+Hex(((c>>6)&0x3F)|0x80)+"%"+Hex((c&0x3F)|0x80);
			ul = 4;
		} else {
			uc = "";
			ul = 0;
		}
		limit -= ul;
		if (limit<0) {
			return dst;
		}
		dst+=uc;
	}
	return dst;
}
/*
 *
 * Gemius Stream v 6.00
 *
 */
if(!gSmDebug){
	var gSmDebug = new function(){
		this.events = new Array();
		this.ready = false;
		this.trace = function(arr){
			if(this.events.length>100) {
				return;
			}
			if(!this.ready){
				this.events.push(arr);
				return;
			}else{
				for(var i=0 ; i<this.events.length ; i++){
					this.send(this.events[i]);
				}
				this.events = new Array();
			}
			this.send(arr);
		}
		this.send = function(arr){}
	}
}
if(!gSmUtil){
	var gSmUtil = new function(){
		this.sid = "";
		this.protectedInterval = 100;
		this.oldSystemTime = (new Date()).getTime();
		this.oldSystemTimeTmp = (new Date()).getTime();
		this.newSystemTime = (new Date()).getTime();
		this.currentTime = 0;
		this.delta = 0;
		this.init = function(){
			while(this.sid.length<10){
				this.sid += Math.round(Math.random()*32).toString(32);
			}
			setTimeout("gSmUtil.updateProtectedTime()", this.protectedInterval);
		}
		this.updateProtectedTime = function(){
			setTimeout("gSmUtil.updateProtectedTime()", gSmUtil.protectedInterval);
			gSmUtil.newSystemTime = (new Date()).getTime();
			var diff = gSmUtil.newSystemTime - gSmUtil.oldSystemTimeTmp - gSmUtil.protectedInterval;
			if(diff < -1000 || diff > 60000){
				gSmUtil.delta += gSmUtil.oldSystemTimeTmp - gSmUtil.newSystemTime + gSmUtil.protectedInterval;
			}
			gSmUtil.oldSystemTimeTmp = gSmUtil.newSystemTime;
			gSmUtil.currentTime = Math.floor((gSmUtil.newSystemTime - gSmUtil.oldSystemTime + gSmUtil.delta)/1000);
		}
		this.formatString = function(string, maxLength, restricted){
			string = (string.length>maxLength)?string.substr(0, maxLength):string;
			for(var i=0 ; i<restricted.length ; i++){
				string = string.replace(restricted[i], " ");
			}
			return string;
		}
		this.getTimeSec = function(){
			return this.currentTime;
		}
		this.isOpera = function(){
			return (window.opera);
		}
		this.isSafari = function(){
			if(this.isChrome()) {
				return false;
			}
			return (navigator.userAgent.toLowerCase().indexOf('safari')!=-1);
		}
		this.isChrome = function(){
			return (navigator.userAgent.toLowerCase().indexOf('chrome')!=-1);
		}
		this.isIE = function(){
			return (navigator.appName.toLowerCase().indexOf("microsoft") != -1);
		}
		this.isFF = function(){
			return (navigator.userAgent.toLowerCase().indexOf("firefox")!=-1);
		}
		this.getBytesLength = function(str) {
			return encodeURIComponent(str).replace(/%../g, 'x').length;
		}
		this.limitBytesLength = function(str, maxBytes, restricted) {
			var currBytes = 0;
			var outStr = "";
			for(var i=0 ; i<restricted.length ; i++){
				str = str.replace(restricted[i], " ");
			}
			for (var i = 0 ; i < str.length ; i++ ) {
				currBytes += gSmUtil.getBytesLength(str.charAt(i));
				if (currBytes > maxBytes) {
					return outStr;
				}
				outStr += str.charAt(i);
			}
			return outStr;
		};
		this.init();
	}
}
if(!gSmNoUnload){
	var gSmNoUnload = new function(){
		this.streams = [];
		this.streamsSlots = 3;
		this.streamsMatch = {};
		this.init = function(){
			if(this.hasUnload())return;
			this.sendAllStreams();
			setTimeout("gSmNoUnload.updateStreams()", 500);
		}
		this.hasUnload = function(){
			if(gSmUtil.isOpera() || gSmUtil.isChrome() || gSmUtil.isSafari())return false;
			return true;
		}
		this.addStream = function(stream, gSmId, gSmHc){
			if(this.hasUnload())return;
			var cookieId = ("gsm_"+(new Date()).getTime()+""+Math.round(Math.random()*1000));
			this.streams.push({cookieId:cookieId ,stream:stream, identifier:gSmId, hitcollector:gSmHc, startTime:(new Date()).getTime(), parameters:gsm_gemius_parameters});
			return cookieId;
		}
		this.updateStreamExt = function(cookieId){
			this.updateStream(cookieId, true);
		}
		this.updateStream = function(cookieId){
			if(this.hasUnload())return;
			var stream, hitcollector, identifier, encoding, lastTime, startTime, currentPackage;
			stream = this.getStream(cookieId);
			identifier = stream.identifier;
			hitcollector = stream.hitcollector;
			parameters = stream.parameters;
			encoding = gSmConfig.ENCODING;
			startTime = stream.startTime;
			currentPackage = stream.stream.getCurrentPackage();
			lastTime = (new Date()).getTime();
			this.writeStream(cookieId, hitcollector, identifier, encoding, startTime, lastTime, currentPackage, parameters);
		}
		this.removeStream = function(cookieId){
			for(var i=0 ; i<this.streams.length ; i++){
				if(this.streams[i].cookieId == cookieId){
					delete this.streams[i];
					this.streams.splice(i, 1);
					return;
				}
			}
		}
		this.getStream = function(cookieId){
			for(var i=0 ; i<this.streams.length ; i++){
				if(this.streams[i].cookieId == cookieId)return this.streams[i];
			}
		}
		this.updateStreams = function(){
			setTimeout("gSmNoUnload.updateStreams()", 500);
			for(var i=0 ; i<gSmNoUnload.streams.length ; i++){
				gSmNoUnload.updateStream(gSmNoUnload.streams[i].cookieId);
			}
		}
		this.writeStream = function(cookieId, hitcollector, identifier, encoding, startTime, lastTime, data, parameters){
			this.createCookie(cookieId,(escape(gSmUtil.sid)+"|"+escape(hitcollector)+"|"+escape(identifier)+"|"+escape(encoding)+"|"+escape(startTime)+"|"+escape(lastTime)+"|"+escape(data)+"|"+escape(parameters)),10);
		}
		this.sendAllStreams = function(){
			var streamsData = this.getAllCookies();
			for(var s in streamsData){
				if((new Date()).getTime() - streamsData[s].lastTime>2000){
					var tdiff = (new Date()).getTime() - streamsData[s].startTime;
					if(tdiff>0 && tdiff<259200000){
						var dataArr = streamsData[s].data.split("|");
						var lastEventArr = dataArr[dataArr.length-1].split(";");
						if(lastEventArr[lastEventArr.length - 1][0] == 0){
							dataArr.splice(dataArr.length-1, 1);
						}
						if(dataArr.length>6){
							dataArr[5] = Number(dataArr[5])+Math.round(tdiff/1000);
							streamsData[s].data = dataArr.join("|");
							this.sendStream(streamsData[s].hitcollector, streamsData[s].identifier, streamsData[s].encoding, streamsData[s].data, streamsData[s].parameters);
						}
					}
					this.eraseCookie(s);
				}
			}
		}
		this.sendStream = function(hitcollector, identifier, encoding, data, parameters){
			if (typeof window.gsm_gemius_images == 'undefined') {
				window.gsm_gemius_images = new Array();
			}
			var gemius_l = window.gsm_gemius_images.length;
			window.gsm_gemius_images[gemius_l] = new Image();
			window.gsm_gemius_images[gemius_l].src = hitcollector+(new Date()).getTime()+'/redot.gif?id='+identifier+'&sargencoding='+encoding+'&sarg='+gsm_gemius_escape(data,1023)+parameters;
			gSmDebug.trace(["final", "sendHit", ["cookie: ",data]]);
		}
		this.getAllCookies = function(){
			var pairs = document.cookie.split(";");
			var cookies = {};
			var params;
			for (var i=0; i<pairs.length; i++){
				var pair = pairs[i].split("=");
				if(pair[0].split("gsm_").length>1){
					params = pair[1].split("|");
					cookies[pair[0]] = {
						sid: unescape(params[0]),
						hitcollector: unescape(params[1]),
						identifier: unescape(params[2]),
						encoding: unescape(params[3]),
						startTime: unescape(params[4]),
						lastTime: unescape(params[5]),
						data: unescape(params[6]),
						parameters: unescape(params[7])
					};
				}
			}
			return cookies;
		}
		this._cookieOldVal = null;
		this.createCookie = function(name,value,days,remove) {
			if(!remove)remove = false;
			setTimeout("gSmNoUnload.createCookieThread('"+name+"','"+value+"',"+days+","+remove+")", 1);
		}
		this.getCookieSlot = function(){
			this.sendAllStreams();
			var streamsData = this.getAllCookies();
			var slots = [];
			for(var i=0 ; i<this.streamsSlots ; i++){
				slots[i]=i;
			}
			for(var s in streamsData){
				var slot = s.split("gsm_c")[1];
				slots[slot] = -1;
			}
			for(var i=0 ; i<slots.length ; i++){
				if(slots[i]>-1)return i;
			}
			return null;
		}
		this.createCookieThread = function(name,value,days,remove) {
			if(!remove){
				if(this.streamsMatch[name]==null){
					var ck = this.getCookieSlot();
					if(ck==null)return;
					this.streamsMatch[name] = "gsm_c"+ck;
				}
				name = this.streamsMatch[name];
			}
			if (days) {
				var date = new Date();
				date.setTime(date.getTime()+(days*24*60*60*1000));
				var expires = "; expires="+date.toGMTString();
			}else{
				var expires = "";
			}
			var newCookieContent = name+"="+value+expires+"; path=/";
			if(newCookieContent == this._cookieOldVal) {
				return;
			}
			document.cookie = newCookieContent;
			this._cookieOldVal = newCookieContent;
		}
		this.readCookie = function(name) {
			var nameEQ = name + "=";
			var ca = document.cookie.split(';');
			for(var i=0;i < ca.length;i++) {
				var c = ca[i];
				while (c.charAt(0)==' ') c = c.substring(1,c.length);
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
			}
			return null;
		}
		this.eraseCookie = function(name) {
			this.createCookie(name,"",-1,true);
		}
		this.init();
	}
}
var gSmStream = function(contentId, player){
	this.contentId = contentId;
	this.contentIdFormated = gSmUtil.limitBytesLength(contentId, gSmConfig.MAX_ID_LENGTH, gSmConfig.ID_RES);
	this.player = player;
	this.closing = false;
	this.init = function(){
		this.duration = null;
		this.time = null;
		this.customPackageString = "";
		this.additionalPackageString = "";
		this.lastPlayTime = null;
		this.lastEvent = "";
		this.lastPlayEndTime = null;
		this.firstTimeStamp = gSmUtil.getTimeSec();
		this.lastTimeStamp = gSmUtil.getTimeSec();
		this.isPlaying = false;
		this.forcedClose = false;
		this.controlBreak = false;
		this.eventString = "";
		this.eventId = "";
		this.infoString = ""
		this.viewId = "";
		this.cookieId = "";
		this.gSmId = "";
		this.gSmHost = "";
		this.treeIdString = "";
		this.realPlaying = false;
	}
	this.init();
	this.newStream = function (duration, customPackage, additionalPackage, gSmId, gSmHc, treeId){
		this.init();
		this.gSmId = (gSmId == undefined || gSmId == null)?gsm_gemius_identifier:gSmId;
		this.gSmHc = (gSmHc == undefined || gSmHc == null)?gsm_gemius_host:(gSmHc+"/_");
		this.cookieId = gSmNoUnload.addStream(this, this.gSmId, this.gSmHc);
		this.duration = (duration>0)?Math.round(duration):-1;
		this.time = 0;
		this.customPackageString = this.formatPackage(customPackage);
		this.additionalPackageString = this.formatPackage(additionalPackage);
		this.treeIdString = this.formatTree(treeId);
		gSmDebug.trace(["final", "newStream", [this.player.playerId, this.contentId, this.duration, this.customPackageString, this.additionalPackageString, this.treeIdString]]);
	}
	this.formatTree = function(arr){
		var out = arr.join(",");
		while(arr.length >= 0 && gSmUtil.getBytesLength(out)>gSmConfig.MAX_TREE_ID_LENGTH){
			arr.pop();
			out = arr.join(",");
		}
		return out;
	}
	this.formatPackage = function(obj){
		var str = "";
		var criterion;
		var category;
		var max_i = (obj.length > gSmConfig.MAX_CRITERIONS)?gSmConfig.MAX_CRITERIONS:obj.length;
		for(var i=0 ; i<max_i ; i++){
			criterion = gSmUtil.limitBytesLength(obj[i]["name"], gSmConfig.MAX_CRITERION_LENGTH, gSmConfig.CRITERION_RES);
			category = gSmUtil.limitBytesLength(obj[i]["value"], gSmConfig.MAX_CATEGORY_LENGTH, gSmConfig.CATEGORY_RES);
			str += ((i==0)?"":";") + criterion + "=" + category;
		}
		return str;
	}
	this.getCurrentPackage = function(){
		var events = this.getEvents(true);
		var viewId = (this.viewId!="")?("#"+this.viewId):("");
		return this.getFormatedData() + "|" + Math.round(this.lastTimeStamp - this.firstTimeStamp)+";"+Math.round(this.lastPlayTime)+";"+Math.round(this.getPlayLength(true))+viewId + events;
	}
	this.closeStream = function(time){
		this.closing = true;
		this.time = time;
		this.lastPlayEndTime = time;
		gSmDebug.trace(["final", "closeStream", [this.player.playerId, this.contentId, Math.round(this.time)]]);
		this.sendStream();
		this.isPlaying = false;
	}
	this.closeStreamForced = function(){
		this.closing = true;
		gSmDebug.trace(["final", "closeStream", [this.player.playerId, this.contentId, Math.round(this.time)]]);
		this.forcedClose = true;
		this.sendStream();
		this.isPlaying = false;
	}
	this.sendStream = function(controlBreak){
		this.controlBreak = (controlBreak == undefined || controlBreak == null)?"":controlBreak;
		if(this.controlBreak == "time" && (this.getCurrEvent()+this.eventString!="")){
			if(this.viewId == "")this.viewId = gemiusStream.newViewId();
		}
		var playLength = this.getPlayLength();
		var currEvent = this.getCurrEvent();
		if(!this.checkLength(currEvent)){
			this.eventString += this.makeCurrEventViewId(currEvent);
			this.sendHit("");
			this.lastPlayTime += playLength;
		}
		if(this.controlBreak == "time")this.realPlaying = false;
	}
	this.sendFirsPlayingEvent = function(){
		this.sendHit("",true);
		this.firsPlayingEvent = true;
	}
	this.event = function(time, eventType){
		this.forcedClose = false;
		this.time = time;

		if(this.lastEvent == eventType) {
			return;
		}
		gSmDebug.trace(["final", "event", [this.player.playerId, this.contentId, Math.round(time), eventType]]);
		switch(eventType){
			case "playing":
				if (this.isPlaying) {
					return;
				}
				if (this.eventString == "") {
					this.firstTimeStamp = gSmUtil.getTimeSec();
				}
				this.lastTimeStamp = gSmUtil.getTimeSec();
				this.lastPlayTime = time;
				if (!this.firsPlayingEvent) {
					this.sendFirsPlayingEvent();
				}
				this.eventId = "p";
				this.realPlaying = true;
				this.isPlaying = true;
				this.viewId = "";
				break;
			case "complete":
				this.eventId = "c";
				this.lastPlayEndTime = time;
				this.sendStream();
				this.isPlaying = false;
				this.viewId = "";
				this.firsPlayingEvent = false;
				break;
			default:
				switch(eventType){
					case "paused":
						this.eventId = "p";
						break;
					case "stopped":
						this.eventId = "s";
						break;
					case "buffering":
						this.eventId = "b";
						break;
					case "seekingStarted":
						this.eventId = "r";
						break;
				}
				if(this.lastPlayTime == null)return;
				this.lastPlayEndTime = time;
				this.controlBreak = "length";
				var currEvent = this.getCurrEvent();
				if(!this.checkLength(currEvent)){
					this.eventString += this.makeCurrEventViewId(currEvent);
				}
				this.isPlaying = false;
				break;
		}
	}
	this.makeCurrEventViewId = function(currEvent){
		return currEvent+((this.viewId!="" && currEvent!="")?("#"+this.viewId):(""));
	}
	this.getPlayLength = function(operaCheck){
		if(operaCheck == undefined || operaCheck == null)operaCheck = false;
		if(this.isPlaying == false) return 0;
		var tCalc, tGet, tGetR;
		tCalc = gSmUtil.getTimeSec() - this.lastTimeStamp;
		tGet = this.lastPlayEndTime - this.lastPlayTime;
		tGetR = Math.round(this.lastPlayEndTime) - Math.round(this.lastPlayTime);
		if(this.forcedClose == true || this.duration==-1 || this.controlBreak != "" || operaCheck == true){
			return tCalc;
		}else if(tGetR==1 || tGetR==0){
			return tGetR;
		}else if(tCalc<=0){
			return tGet;
		}else if(tGet<=0){
			return tCalc;
		}else{
			return Math.min(tCalc, tGet);
		}
	}
	this.getEvents = function(exit){
		exit = (exit == undefined)?false:exit;
		var events = "";
		if(this.controlBreak == "" || this.controlBreak == "length" || exit){
			events = ((this.viewId!="")?"":"^p")+((this.forcedClose || exit || this.closing)?"$q":("$"+this.eventId));
		}else{
			events = (this.realPlaying)?"^p":"";
			if(this.eventId!="p")events = "^"+this.eventId;
		}
		return events;
	}
	this.getCurrEvent = function(){
		var playLength = Math.round(this.getPlayLength());
		if(playLength > 0){
			return "|"+Math.round(this.lastTimeStamp-this.firstTimeStamp)+";"+Math.round(this.lastPlayTime)+";"+playLength+this.getEvents();
		}else{
			return "";
		}
	}
	this.sendHit = function(currEvent, forced){
		if (forced == undefined) {
			forced = false;
		}
		if (this.eventString == "" && currEvent == "" && forced == false) {
			return;
		}
		this.eventString += currEvent;
		if(this.eventId=="c"){
			var parr = this.eventString.split("|");
			var estr = parr[parr.length-1];
			var st = estr.indexOf("$");
			var fstr = estr.substring(0,st)+"$c"+estr.substring(st+2,estr.length);
			parr[parr.length-1] = fstr;
			this.eventString = parr.join("|");
		}
		var outputData = this.getFormatedData(forced);
		this.eventString = "";
		this.firstTimeStamp = gSmUtil.getTimeSec();
		this.lastTimeStamp = gSmUtil.getTimeSec();
		if (typeof window.gsm_gemius_images == 'undefined') {
			window.gsm_gemius_images = new Array();
		}
		var gemius_l = window.gsm_gemius_images.length;
		window.gsm_gemius_images[gemius_l] = new Image();
		window.gsm_gemius_images[gemius_l].src = this.gSmHc+(new Date()).getTime()+'/redot.gif?id='+this.gSmId+'&sargencoding='+gSmConfig.ENCODING+'&sarg='+gsm_gemius_escape(outputData,1023)+gsm_gemius_parameters;
		gSmDebug.trace(["final", "sendHit",["script: "+outputData]]);
		gSmNoUnload.updateStreamExt(this.cookieId);
	}
	this.hasEvent = function(){
		this.forcedClose = true;
		if (this.eventString + this.getCurrEvent() != "") {
			return true;
		}
		return false;
	}
	this.checkLength = function(currEvent){
		if(gSmUtil.getBytesLength(this.getFormatedData()) + currEvent.length + 1 >= (gSmConfig.MAX_LOG_LENGTH + gSmConfig.VIEW_ID_LENGTH)){
			this.sendHit(currEvent);
			return true;
		}
		return false;
	}
	this.getFormatedData = function(forced){
		var out = "";
		var delta = Math.round(gSmUtil.getTimeSec() - this.firstTimeStamp);
		var forcedData = "";
		if(forced){
			forcedData = "|"+Math.round(gSmUtil.getTimeSec() - this.firstTimeStamp)+";"+Math.round(this.lastPlayTime)+";0!f";
		}
		this.infoString = "v="+gSmConfig.VERSION+"|"+this.treeIdString+"|"+this.contentIdFormated+"|"+this.duration+"|"+this.customPackageString+"|"+this.additionalPackageString+"|"+delta+forcedData;
		out = this.infoString+this.eventString;
		return out;
	}
}
var gSmPlayer = function(playerId){
	this.playerId = playerId;
	this.streamsArray = new Array();
	this.newStream = function(contentId, duration, customPackage, additionalPackage, gSmId, gSmHost, treeId){
		var stream = this.getStream(contentId, true);
		stream.newStream(duration, customPackage, additionalPackage, gSmId, gSmHost, treeId);
	}
	this.closeStream = function(contentId, time){
		var stream = this.getStream(contentId);
		if(stream == null)return;
		stream.closeStream(time);
		this.removeStream(contentId);
	}
	this.event = function(contentId, time, eventType){
		var stream = this.getStream(contentId);
		if(stream == null)return;
		stream.event(time, eventType);
	}
	this.getStream = function(contentId, forced){
		forced = (forced)?true:false;
		var stream = null;
		for(var i=0 ; i<this.streamsArray.length ; i++){
			if(this.streamsArray[i].contentId == contentId) stream = this.streamsArray[i];
		}
		if(stream == null && forced){
			stream = new gSmStream(contentId, this);
			this.streamsArray.push(stream);
		}
		return stream;
	}
	this.removeStream = function(contentId){
		for(var i=0 ; i<this.streamsArray.length ; i++){
			if(this.streamsArray[i].contentId == contentId){
				delete this.streamsArray[i];
				this.streamsArray.splice(i,1);
			}
		}
	}
	this.sendAllStreams = function(type){
		for(var i=0 ; i<this.streamsArray.length ; i++){
			this.streamsArray[i].sendStream(type);
		}
	}
	this.checkAllStreams = function(){
		for(var i=0 ; i<this.streamsArray.length ; i++){
			if(this.streamsArray[i].hasEvent())return true;
		}
		return false;
	}
	this.closeAllStreams = function(){
		for(var i=0 ; i<this.streamsArray.length ; i++){
			this.streamsArray[i].closeStreamForced();
		}
	}
}
if(!gSmConfig){
	var gSmConfig = new function(){
		this.VERSION = 6;
		this.MAX_CRITERIONS = 6;
		this.MAX_CRITERION_LENGTH = 16;
		this.MAX_CATEGORY_LENGTH = 64;
		this.MAX_TREE_ID_LENGTH = 64;
		this.MAX_ID_LENGTH = 64;
		this.VIEW_ID_LENGTH = 16;
		this.ID_RES = ["|","*","\n","\t","\r"];
		this.CRITERION_RES = ["|","*","\n","\t","\r",";","=","/","#"];
		this.CATEGORY_RES = ["|","*","\n","\t","\r",";","=","/","#"];
		this.TIMEOUT = 300;
		this.MAX_LOG_LENGTH = 990;
		this.ENCODING = "utf-8";
		this.setEncoding = function(encoding){
			this.ENCODING = encoding;
		}
	}
}
if(!gemiusStream){
	var gemiusStream = new function(){
		this.lastTimeCheck = gSmUtil.getTimeSec();
		this.init = function(){
			this.session = (new Date()).getTime().toString(36)+Math.round(Math.random()*100000000).toString(36)+Math.round(Math.random()*100000000).toString(36);
			this.flashObjectsArray = new Array();
			this.playersArray = new Array();
			if(gSmNoUnload.hasUnload()){
				if (window.addEventListener){
					window.addEventListener('unload',this.onUnload,true);
				}else if(window.attachEvent){
					window.attachEvent('onunload',this.onUnload);
				}
			}
			setTimeout("gemiusStream.timeCheck()", 1000);
		}
		this.newStream = function(playerId, contentId, duration, customPackage, additionalPackage, gSmId, gSmHc, treeId){
			if (playerId == null || contentId == null || playerId==undefined || contentId==undefined) {
				return;
			}
			if (customPackage == null) {
				customPackage = new Array();
			}
			if (additionalPackage == null) {
				additionalPackage = new Array();
			}
			if (treeId == null) {
				treeId = [];
			}
			var player = this.getPlayer(playerId);
			player.newStream(contentId, duration, customPackage, additionalPackage, gSmId, gSmHc, treeId);
		}
		this.closeStream = function(playerId, contentId, time){
			if (playerId == null || contentId == null || playerId==undefined || contentId==undefined) {
				return;
			}
			var player = this.getPlayer(playerId);
			player.closeStream(contentId, time);
		}
		this.event = function(playerId, contentId, time, eventType){
			if (playerId == null || contentId == null || playerId==undefined || contentId==undefined) {
				return;
			}
			var player = this.getPlayer(playerId);
			player.event(contentId, time, eventType);
		}
		this.getPlayer = function(playerId){
			var player = null;
			for (var i=0 ; i<this.playersArray.length ; i++) {
				if(this.playersArray[i].playerId == playerId) player = this.playersArray[i];
			}
			if(player == null){
				player = new gSmPlayer(playerId);
				this.playersArray.push(player);
			}
			return player;
		}
		this.timeCheck = function(){
			setTimeout("gemiusStream.timeCheck()", 1000);
			if (gSmUtil.getTimeSec() - gemiusStream.lastTimeCheck >= gSmConfig.TIMEOUT) {
				gemiusStream.lastTimeCheck = gSmUtil.getTimeSec();
				gSmDebug.trace(["final", "timeCheck",[]]);
				this.sendAllStreams();
			}
		}
		this.sendAllStreams = function(){
			for (var i=0 ; i<this.playersArray.length ; i++) {
				this.playersArray[i].sendAllStreams("time");
			}
		}
		this.checkAllStreams = function(){
			for(var i=0 ; i<this.playersArray.length ; i++){
				if(this.playersArray[i].checkAllStreams())return true;
			}
			return false;
		}
		this.closeAllStreams = function(){
			for(var i=0 ; i<this.playersArray.length ; i++){
				this.playersArray[i].closeAllStreams();
			}
		}
		this.registerFlashObject = function(objectId){
			if(objectId == null) return;
			for(var i=0 ; i<this.flashObjectsArray.length ; i++){
				if(objectId == this.flashObjectsArray[i]) return;
			}
			this.flashObjectsArray.push(objectId);
		}
		this.onUnload = function(){
			if(!gemiusStream.checkAllStreams())return;
			gemiusStream.closeAllStreams();
			var start = (new Date()).getTime();
			while (start+200>(new Date()).getTime());
		}
		this._viewId = 0;
		this.viewId = function(){
			return this._viewId;
		}
		this.newViewId = function(){
			this._viewId++;
			return this._viewId;
		}
		this.init();
	}
}
/*
 *
 * Session to match
 *
 */
function gsm_gemius_sarg_hit(sarg) {
	var gemius_sarg_url = gsm_gemius_host+(new Date()).getTime()+'/redot.gif?l=16&id='+gsm_gemius_identifier+'&sarg='+sarg+gsm_gemius_parameters;
	if (typeof window.gemius_sarg_images == 'undefined') {
		window.gemius_sarg_images = new Array();
	}
	var gemius_l = window.gemius_sarg_images.length;
	if (typeof gemius_sarg_sem == 'undefined') {
		gemius_sarg_sem=0;
	}
	if (gemius_l<=gemius_sarg_sem) {
		window.gemius_sarg_images[gemius_l]=new Image();
		window.gemius_sarg_images[gemius_l].src = gemius_sarg_url;
	}
	gemius_sarg_sem++;
}
function gsm_gemius_generate_STM(){
	var STM = (new Date()).getTime().toString(36)+Math.round(Math.random()*100000000).toString(36)+Math.round(Math.random()*100000000).toString(36);
	gsm_gemius_sarg_hit("SESSION_TO_MATCH="+STM);
	return STM;
}
function gsm_gemius_url(url, STM, id, catArray, enc, additional){
	additional = typeof(additional) != ('undefined'||null) ? additional : "";
	var gemius_url = url + "?SESSION_TO_MATCH=" + STM + "&MATERIAL_IDENTIFIER=" + id.toString();
	for(var i=0; i<catArray.length; ++i){
		gemius_url += "&" + catArray[i][0] + "=" + catArray[i][1];
	}
	gemius_url += "&ENCODING=" + enc + additional;
	return gemius_url;
}










// tinyslider
var TINY = {};

function T$(i) {
    return document.getElementById(i)
}

function T$$(e, p) {
    return p.getElementsByTagName(e)
}

TINY.slider = function() {
    function slide(n, p) {
        this.n = n;
        this.init(p)
    }
    slide.prototype.init = function(p) {
        var s = this.x = T$(p.id),
            u = this.u = T$$('ul', s)[0],
            c = this.m = T$$('li', u),
            l = c.length,
            i = this.l = this.c = 0;
        this.b = 1;
        if (p.navid && p.activeclass) {
            this.g = T$$('li', T$(p.navid));
            this.s = p.activeclass
        }
        this.a = p.auto || 0;
        this.p = p.resume || 0;
        this.r = p.rewind || 0;
        this.e = p.elastic || false;
        this.v = p.vertical || 0;
        s.style.overflow = 'hidden';
        for (i; i < l; i++) {
            if (c[i].parentNode == u) {
                this.l++
            }
        }
        if (this.v) {;
            u.style.top = 0;
            this.h = p.height || c[0].offsetHeight;
            u.style.height = (this.l * this.h) + 'px'
        } else {
            u.style.left = 0;
            this.w = p.width || c[0].offsetWidth;
            u.style.width = (this.l * this.w) + 'px'
        }
        this.nav(p.position || 0);
        if (p.position) {
            this.pos(p.position || 0, this.a ? 1 : 0, 1)
        } else if (this.a) {
            this.auto()
        }
        if (p.left) {
            this.sel(p.left)
        }
        if (p.right) {
            this.sel(p.right)
        }
    }, slide.prototype.auto = function() {
        this.x.ai = setInterval(new Function(this.n + '.move(1,1,1)'), this.a * 1000)
    }, slide.prototype.move = function(d, a) {
        var n = this.c + d;
        if (this.r) {
            n = d == 1 ? n == this.l ? 0 : n : n < 0 ? this.l - 1 : n
        }
        this.pos(n, a, 1)
    }, slide.prototype.pos = function(p, a, m) {
        var v = p;
        clearInterval(this.x.ai);
        clearInterval(this.x.si);
        if (!this.r) {
            if (m) {
                if (p == -1 || (p != 0 && Math.abs(p) % this.l == 0)) {
                    this.b++;
                    for (var i = 0; i < this.l; i++) {
                        this.u.appendChild(this.m[i].cloneNode(1))
                    }
                    this.v ? this.u.style.height = (this.l * this.h * this.b) + 'px' : this.u.style.width = (this.l * this.w * this.b) + 'px';
                }
                if (p == -1 || (p < 0 && Math.abs(p) % this.l == 0)) {
                    this.v ? this.u.style.top = (this.l * this.h * -1) + 'px' : this.u.style.left = (this.l * this.w * -1) + 'px';
                    v = this.l - 1
                }
            } else if (this.c > this.l && this.b > 1) {
                v = (this.l * (this.b - 1)) + p;
                p = v
            }
        }
        var t = this.v ? v * this.h * -1 : v * this.w * -1,
            d = p < this.c ? -1 : 1;
        this.c = v;
        var n = this.c % this.l;
        this.nav(n);
        if (this.e) {
            t = t - (8 * d)
        }
        this.x.si = setInterval(new Function(this.n + '.slide(' + t + ',' + d + ',1,' + a + ')'), 10)
    }, slide.prototype.nav = function(n) {
        if (this.g) {
            for (var i = 0; i < this.l; i++) {
                this.g[i].className = i == n ? this.s : ''
            }
        }
    }, slide.prototype.slide = function(t, d, i, a) {
        var o = this.v ? parseInt(this.u.style.top) : parseInt(this.u.style.left);
        if (o == t) {
            clearInterval(this.x.si);
            if (this.e && i < 3) {
                this.x.si = setInterval(new Function(this.n + '.slide(' + (i == 1 ? t + (12 * d) : t + (4 * d)) + ',' + (i == 1 ? (-1 * d) : (-1 * d)) + ',' + (i == 1 ? 2 : 3) + ',' + a + ')'), 10)
            } else {
                if (a || (this.a && this.p)) {
                    this.auto()
                }
                if (this.b > 1 && this.c % this.l == 0) {
                    this.clear()
                }
            }
        } else {
            var v = o - Math.ceil(Math.abs(t - o) * .1) * d + 'px';
            /*console.log(v);*/
            this.u.className = 'active';
            this.v ? this.u.style.top = v : this.u.style.left = v
        }
    }, slide.prototype.clear = function() {
        var c = T$$('li', this.u),
            t = i = c.length;
        this.v ? this.u.style.top = 0 : this.u.style.left = 0;
        this.b = 1;
        this.c = 0;
        for (i; i > 0; i--) {
            var e = c[i - 1];
            if (t > this.l && e.parentNode == this.u) {
                this.u.removeChild(e);
                t--
            }
        }
    }, slide.prototype.sel = function(i) {
        var e = T$(i);
        e.onselectstart = e.onmousedown = function() {
            return false
        }
    }
    return {
        slide: slide
    }
}();


// tinybox2

TINY.box=function(){
	var j,m,b,g,v,p=0;
	return{
		show:function(o){
			v={opacity:100,close:1,animate:0,fixed:1,method:'GET',mask:0,maskid:'',boxid:'',topsplit:2,url:0,post:0,height:0,width:0,html:0,iframe:0};
			for(s in o){v[s]=o[s]}
			if(!p){
				j=document.createElement('div'); j.className='tbox';
				p=document.createElement('div'); p.className='tinner';
				b=document.createElement('div'); b.className='tcontent';
				m=document.createElement('div'); m.className='tmask';
				g=document.createElement('div'); g.className='tclose'; g.v=0;
				document.body.appendChild(m); document.body.appendChild(j); j.appendChild(p); p.appendChild(b);
				m.onclick=g.onclick=TINY.box.hide; window.onresize=TINY.box.resize
			}else{
				j.style.display='none'; clearTimeout(p.ah); if(g.v){p.removeChild(g); g.v=0}
			}
			p.id=v.boxid; m.id=v.maskid; j.style.position=v.fixed?'fixed':'absolute';
			if(v.html&&!v.animate){
				p.style.backgroundImage='none'; b.innerHTML=v.html; b.style.display='';
				p.style.width=v.width?v.width+'px':'auto'; p.style.height=v.height?v.height+'px':'auto'
			}else{
				b.style.display='none';
				if(!v.animate&&v.width&&v.height){
					p.style.width=v.width+'px'; p.style.height=v.height+'px'
				}else{
					p.style.width=p.style.height='100px'
				}
			}
			//v.mask = 0;
			//if(v.mask){this.mask(); this.alpha(m,1,v.opacity)}
			
			if(v.mask) m.style.display = 'block';
			this.alpha(j,1,100);

			if(v.autohide){p.ah=setTimeout(TINY.box.hide,1000*v.autohide)}else{document.onkeyup=TINY.box.esc}
		},
		fill:function(c,u,k,a,w,h){
			if(u){
				if(v.image){
					var i=new Image(); i.onload=function(){w=w||i.width; h=h||i.height; TINY.box.psh(i,a,w,h)}; i.src=v.image
				}else if(v.iframe){
					this.psh('<iframe src="'+v.iframe+'" width="'+v.width+'" frameborder="0" height="'+v.height+'"></iframe>',a,w,h)
				}else{
					var x=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
					x.onreadystatechange=function(){
						if(x.readyState==4&&x.status==200){p.style.backgroundImage=''; TINY.box.psh(x.responseText,a,w,h)}
					};
					if(k){
    	            	x.open('POST',c,true); x.setRequestHeader('Content-type','application/x-www-form-urlencoded'); x.send(k)
					}else{
       	         		x.open(v.method,c,true); x.send(null)
					}
				}
			}else{
				this.psh(c,a,w,h)
			}
		},
		psh:function(c,a,w,h){
			if(typeof c=='object'){b.appendChild(c)}else{b.innerHTML=c}
			var x=p.style.width, y=p.style.height;
			if(!w||!h){
				p.style.width=w?w+'px':''; p.style.height=h?h+'px':''; b.style.display='';
				if(!h){h=parseInt(b.offsetHeight)}
				if(!w){w=parseInt(b.offsetWidth)}
				b.style.display='none'
			}
			p.style.width=x; p.style.height=y;
			this.size(w,h,a)
		},
		esc:function(e){e=e||window.event; if(e.keyCode==27){TINY.box.hide()}},
		hide:function(){/*TINY.box.alpha(j,-1,0,3);*/ j.style.display='none'; document.onkeypress=null; m.style.display="none"; ;if(v.closejs){v.closejs()}},
		resize:function(){TINY.box.pos(); TINY.box.mask()},
		mask:function(){m.style.height=this.total(1)+'px'; m.style.width=this.total(0)+'px'},
		pos:function(){
			var t;
			if(typeof v.top!='undefined'){t=v.top}else{t=(this.height()/v.topsplit)-(j.offsetHeight/2); t=t<20?20:t}
			if(!v.fixed&&!v.top){t+=this.top()}
			j.style.top=t+'px';
			j.style.left=typeof v.left!='undefined'?v.left+'px':(this.width()/2)-(j.offsetWidth/2)+'px'
		},
		alpha:function(e,d,a){
			//clearInterval(e.ai);
			//if(d){e.style.opacity=0; e.style.filter='alpha(opacity=0)'; e.style.display='block'; TINY.box.pos()}
			//e.ai=setInterval(function(){TINY.box.ta(e,a,d)},20)
			e.style.display='block';
			TINY.box.fill(v.html||v.url,v.url||v.iframe||v.image,v.post,v.animate,v.width,v.height);
			TINY.box.pos();
		},
		ta:function(e,a,d){
			var o=Math.round(e.style.opacity*100);
			if(o==a){
				clearInterval(e.ai);
				if(d==-1){
					e.style.display='none';
					e==j?TINY.box.alpha(m,-1,0,2):b.innerHTML=p.style.backgroundImage=''
				}else{
					if(e==m){
						this.alpha(j,1,100)
					}else{
						j.style.filter='';
						TINY.box.fill(v.html||v.url,v.url||v.iframe||v.image,v.post,v.animate,v.width,v.height)
					}
				}
			}else{
				var n=a-Math.floor(Math.abs(a-o)*.5)*d;
				e.style.opacity=n/100; e.style.filter='alpha(opacity='+n+')'
			}
		},
		size:function(w,h,a){
			if(a){
				clearInterval(p.si); var wd=parseInt(p.style.width)>w?-1:1, hd=parseInt(p.style.height)>h?-1:1;
				p.si=setInterval(function(){TINY.box.ts(w,wd,h,hd)},20)
			}else{
				p.style.backgroundImage='none'; if(v.close){p.appendChild(g); g.v=1}
				p.style.width=w+'px'; p.style.height=h+'px'; b.style.display=''; this.pos();
				if(v.openjs){v.openjs()}
			}
		},
		ts:function(w,wd,h,hd){
			var cw=parseInt(p.style.width), ch=parseInt(p.style.height);
			if(cw==w&&ch==h){
				clearInterval(p.si); p.style.backgroundImage='none'; b.style.display='block'; if(v.close){p.appendChild(g); g.v=1}
				if(v.openjs){v.openjs()}
			}else{
				if(cw!=w){p.style.width=(w-Math.floor(Math.abs(w-cw)*.6)*wd)+'px'}
				if(ch!=h){p.style.height=(h-Math.floor(Math.abs(h-ch)*.6)*hd)+'px'}
				this.pos()
			}
		},
		top:function(){return document.documentElement.scrollTop||document.body.scrollTop},
		width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
		height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},
		total:function(d){
			var b=document.body, e=document.documentElement;
			return d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):
			Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))
		}
	}
}();



var TINY2 = {}

TINY2.box2=function(){
	var j,m,b,g,v,p=0;
	return{
		show:function(o){
			v={opacity:100,close:1,animate:0,fixed:1,method:'GET',mask:0,maskid:'',boxid:'',topsplit:2,url:0,post:0,height:0,width:0,html:0,iframe:0};
			for(s in o){v[s]=o[s]}
			if(!p){
				j=document.createElement('div'); j.className='tbox';
				p=document.createElement('div'); p.className='tinner';
				b=document.createElement('div'); b.className='tcontent';
				m=document.createElement('div'); m.className='tmask';
				g=document.createElement('div'); g.className='tclose'; g.v=0;
				document.body.appendChild(m); document.body.appendChild(j); j.appendChild(p); p.appendChild(b);
				m.onclick=g.onclick=TINY2.box2.hide; window.onresize=TINY2.box2.resize
			}else{
				j.style.display='none'; clearTimeout(p.ah); if(g.v){p.removeChild(g); g.v=0}
			}
			p.id=v.boxid; m.id=v.maskid; j.style.position=v.fixed?'fixed':'absolute';
			if(v.html&&!v.animate){
				p.style.backgroundImage='none'; b.innerHTML=v.html; b.style.display='';
				p.style.width=v.width?v.width+'px':'auto'; p.style.height=v.height?v.height+'px':'auto'
			}else{
				b.style.display='none';
				if(!v.animate&&v.width&&v.height){
					p.style.width=v.width+'px'; p.style.height=v.height+'px'
				}else{
					p.style.width=p.style.height='100px'
				}
			}
			//v.mask = 0;
			//if(v.mask){this.mask(); this.alpha(m,1,v.opacity)}
			
			if(v.mask) m.style.display = 'block';
			this.alpha(j,1,100);

			if(v.autohide){p.ah=setTimeout(TINY2.box2.hide,1000*v.autohide)}else{document.onkeyup=TINY2.box2.esc}
		},
		fill:function(c,u,k,a,w,h){
			if(u){
				if(v.image){
					var i=new Image(); i.onload=function(){w=w||i.width; h=h||i.height; TINY2.box2.psh(i,a,w,h)}; i.src=v.image
				}else if(v.iframe){
					this.psh('<iframe src="'+v.iframe+'" width="'+v.width+'" frameborder="0" height="'+v.height+'"></iframe>',a,w,h)
				}else{
					var x=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
					x.onreadystatechange=function(){
						if(x.readyState==4&&x.status==200){p.style.backgroundImage=''; TINY2.box2.psh(x.responseText,a,w,h)}
					};
					if(k){
    	            	x.open('POST',c,true); x.setRequestHeader('Content-type','application/x-www-form-urlencoded'); x.send(k)
					}else{
       	         		x.open(v.method,c,true); x.send(null)
					}
				}
			}else{
				this.psh(c,a,w,h)
			}
		},
		psh:function(c,a,w,h){
			if(typeof c=='object'){b.appendChild(c)}else{b.innerHTML=c}
			var x=p.style.width, y=p.style.height;
			if(!w||!h){
				p.style.width=w?w+'px':''; p.style.height=h?h+'px':''; b.style.display='';
				if(!h){h=parseInt(b.offsetHeight)}
				if(!w){w=parseInt(b.offsetWidth)}
				b.style.display='none'
			}
			p.style.width=x; p.style.height=y;
			this.size(w,h,a)
		},
		esc:function(e){e=e||window.event; if(e.keyCode==27){TINY2.box2.hide()}},
		hide:function(){/*TINY.box.alpha(j,-1,0,3);*/ j.style.display='none'; document.onkeypress=null; m.style.display="none"; ;if(v.closejs){v.closejs()}},
		resize:function(){TINY2.box2.pos(); TINY2.box2.mask()},
		mask:function(){m.style.height=this.total(1)+'px'; m.style.width=this.total(0)+'px'},
		pos:function(){
			var t;
			if(typeof v.top!='undefined'){t=v.top}else{t=(this.height()/v.topsplit)-(j.offsetHeight/2); t=t<20?20:t}
			if(!v.fixed&&!v.top){t+=this.top()}
			j.style.top=t+'px';
			j.style.left=typeof v.left!='undefined'?v.left+'px':(this.width()/2)-(j.offsetWidth/2)+'px'
		},
		alpha:function(e,d,a){
			//clearInterval(e.ai);
			//if(d){e.style.opacity=0; e.style.filter='alpha(opacity=0)'; e.style.display='block'; TINY.box.pos()}
			//e.ai=setInterval(function(){TINY.box.ta(e,a,d)},20)
			e.style.display='block';
			TINY2.box2.fill(v.html||v.url,v.url||v.iframe||v.image,v.post,v.animate,v.width,v.height);
			TINY2.box2.pos();
		},
		ta:function(e,a,d){
			var o=Math.round(e.style.opacity*100);
			if(o==a){
				clearInterval(e.ai);
				if(d==-1){
					e.style.display='none';
					e==j?TINY2.box2.alpha(m,-1,0,2):b.innerHTML=p.style.backgroundImage=''
				}else{
					if(e==m){
						this.alpha(j,1,100)
					}else{
						j.style.filter='';
						TINY2.box2.fill(v.html||v.url,v.url||v.iframe||v.image,v.post,v.animate,v.width,v.height)
					}
				}
			}else{
				var n=a-Math.floor(Math.abs(a-o)*.5)*d;
				e.style.opacity=n/100; e.style.filter='alpha(opacity='+n+')'
			}
		},
		size:function(w,h,a){
			if(a){
				clearInterval(p.si); var wd=parseInt(p.style.width)>w?-1:1, hd=parseInt(p.style.height)>h?-1:1;
				p.si=setInterval(function(){TINY2.box2.ts(w,wd,h,hd)},20)
			}else{
				p.style.backgroundImage='none'; if(v.close){p.appendChild(g); g.v=1}
				p.style.width=w+'px'; p.style.height=h+'px'; b.style.display=''; this.pos();
				if(v.openjs){v.openjs()}
			}
		},
		ts:function(w,wd,h,hd){
			var cw=parseInt(p.style.width), ch=parseInt(p.style.height);
			if(cw==w&&ch==h){
				clearInterval(p.si); p.style.backgroundImage='none'; b.style.display='block'; if(v.close){p.appendChild(g); g.v=1}
				if(v.openjs){v.openjs()}
			}else{
				if(cw!=w){p.style.width=(w-Math.floor(Math.abs(w-cw)*.6)*wd)+'px'}
				if(ch!=h){p.style.height=(h-Math.floor(Math.abs(h-ch)*.6)*hd)+'px'}
				this.pos()
			}
		},
		top:function(){return document.documentElement.scrollTop||document.body.scrollTop},
		width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
		height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},
		total:function(d){
			var b=document.body, e=document.documentElement;
			return d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):
			Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))
		}
	}
}();





















// Copyright (c) 2006 Michael Mahemoff. Only works in Firefox and Opera.
// Background and MIT License notice at end of file, see the homepage for more.
var tab={defaultPause:2000,change:function(iconURL,optionalDocTitle){clearTimeout(this.loopTimer);if(optionalDocTitle){document.title=optionalDocTitle;}
this.addLink(iconURL,true);},animate:function(iconSequence,optionalDelay){this.preloadIcons(iconSequence);this.iconSequence=iconSequence;this.sequencePause=(optionalDelay)?optionalDelay:this.defaultPause;favicon.index=0;favicon.change(iconSequence[0]);this.loopTimer=setInterval(function(){favicon.index=(favicon.index+1)%favicon.iconSequence.length;favicon.addLink(favicon.iconSequence[favicon.index],false);},favicon.sequencePause);},loopTimer:null,preloadIcons:function(iconSequence){var dummyImageForPreloading=document.createElement("img");for(var i=0;i<iconSequence.length;i++){dummyImageForPreloading.src=iconSequence[i];}},addLink:function(iconURL){var link=document.createElement("link");link.type="image/x-icon";link.rel="shortcut icon";link.href=iconURL;this.removeLinkIfExists();this.docHead.appendChild(link);},removeLinkIfExists:function(){var links=this.docHead.getElementsByTagName("link");for(var i=0;i<links.length;i++){var link=links[i];if(link.type=="image/x-icon"&&link.rel=="shortcut icon"){this.docHead.removeChild(link);return;}}},docHead:document.getElementsByTagName("head")[0]}
// LEGAL
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE.// JavaScript Document

























var _gaq = _gaq || [];
var utmgif = 'http://kropka.fm.tuba.pl/__utm.gif';
	_gaq.push(['_setDomainName', '.fm.tuba.pl']); 
	_gaq.push(['_setAccount', 'UA-426268-1']);
	_gaq.push(['_setCampaignCookieTimeout', 0]);
	_gaq.push(['_setLocalGifPath',utmgif]);
	_gaq.push(['_setLocalRemoteServerMode']);
	_gaq.push(['_trackPageview']);


// www.google-analytics.com/ga.js
(function(){var g=void 0,h=null,aa=encodeURIComponent,ba=decodeURIComponent,i=Math;function ca(a,b){return a.name=b}var k="push",da="load",l="charAt",ea="value",m="indexOf",fa="match",ga="name",ha="host",o="toString",r="length",s="prototype",t="split",u="stopPropagation",ia="scope",v="location",w="getString",x="substring",ja="navigator",y="join",z="toLowerCase",A;function ka(a,b){switch(b){case 0:return""+a;case 1:return a*1;case 2:return!!a;case 3:return a*1E3}return a}function B(a){return g==a||"-"==a||""==a}function la(a){if(!a||""==a)return"";for(;a&&" \n\r\t"[m](a[l](0))>-1;)a=a[x](1);for(;a&&" \n\r\t"[m](a[l](a[r]-1))>-1;)a=a[x](0,a[r]-1);return a}function ma(a){var b=1,c=0,d;if(!B(a)){b=0;for(d=a[r]-1;d>=0;d--)c=a.charCodeAt(d),b=(b<<6&268435455)+c+(c<<14),c=b&266338304,b=c!=0?b^c>>21:b}return b}function na(){return i.round(i.random()*2147483647)}
function oa(){}function C(a,b){return aa instanceof Function?b?encodeURI(a):aa(a):(D(68),escape(a))}function E(a){a=a[t]("+")[y](" ");if(ba instanceof Function)try{return ba(a)}catch(b){D(17)}else D(68);return unescape(a)}var pa=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)},qa=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,!!d):a.detachEvent&&a.detachEvent("on"+b,c)};function ra(a){return a&&a[r]>0?a[0]:""}
function sa(a){var b=a?a[r]:0;return b>0?a[b-1]:""}var ta=function(){this.prefix="ga.";this.F={}};ta[s].set=function(a,b){this.F[this.prefix+a]=b};ta[s].get=function(a){return this.F[this.prefix+a]};ta[s].contains=function(a){return this.get(a)!==g};function ua(a){a[m]("www.")==0&&(a=a[x](4));return a[z]()}function va(a,b){var c,d={url:a,protocol:"http",host:"",path:"",c:new ta,anchor:""};if(!a)return d;c=a[m]("://");if(c>=0)d.protocol=a[x](0,c),a=a[x](c+3);c=a.search("/|\\?|#");if(c>=0)d.host=a[x](0,c)[z](),a=a[x](c);else return d.host=a[z](),d;c=a[m]("#");if(c>=0)d.anchor=a[x](c+1),a=a[x](0,c);c=a[m]("?");c>=0&&(wa(d.c,a[x](c+1)),a=a[x](0,c));d.anchor&&b&&wa(d.c,d.anchor);a&&a[l](0)=="/"&&(a=a[x](1));d.path=a;return d}
function wa(a,b){function c(b,c){a.contains(b)||a.set(b,[]);a.get(b)[k](c)}for(var d=la(b)[t]("&"),e=0;e<d[r];e++)if(d[e]){var f=d[e][m]("=");f<0?c(d[e],"1"):c(d[e][x](0,f),d[e][x](f+1))}}function xa(a,b){if(B(a))return"-";if("["==a[l](0)&&"]"==a[l](a[r]-1))return"-";var c=F.domain;c+=b&&b!="/"?b:"";return a[m](c)==(a[m]("http://")==0?7:a[m]("https://")==0?8:0)?"0":a};var ya=0;function G(a){return(a?"_":"")+ya++}var za=G(),Aa=G(),Ba=G(),H=G(),J=G(),K=G(),L=G(),Ca=G(),Da=G(),Ea=G(),Fa=G(),Ga=G(),Ha=G(),Ia=G(),Ja=G(),Ka=G(),La=G(),Ma=G(),Na=G(),Oa=G(),Pa=G(),Qa=G(),Ra=G(),Sa=G(),Ta=G(),Ua=G(),Va=G(),Wa=G(),Xa=G(),Ya=G(),Za=G(),$a=G(),ab=G(),bb=G(),cb=G();G();
var M=G(!0),db=G(),eb=G(),fb=G(),gb=G(),hb=G(),ib=G(),jb=G(),kb=G(),lb=G(),mb=G(),N=G(!0),nb=G(!0),ob=G(!0),rb=G(!0),sb=G(!0),tb=G(!0),ub=G(!0),vb=G(!0),wb=G(!0),xb=G(!0),yb=G(!0),O=G(!0),zb=G(!0),Ab=G(!0),Bb=G(!0),Cb=G(!0),Db=G(!0),Eb=G(!0),Fb=G(!0),Gb=G(!0),Hb=G(!0),Ib=G(!0),Jb=G(!0),Kb=G(!0),Lb=G(!0),Mb=G(),Nb=G();G();var Ob=G(),Pb=G(),Qb=G(),Tb=G(),Ub=G(),Vb=G(),Wb=G(),Xb=G();G();var Yb=G(),Zb=G();var $b=function(){function a(a,c,d){P(Q[s],a,c,d)}R("_getName",Ba,58);R("_getAccount",za,64);R("_visitCode",N,54);R("_getClientInfo",Ia,53,1);R("_getDetectTitle",La,56,1);R("_getDetectFlash",Ja,65,1);R("_getLocalGifPath",Va,57);R("_getServiceMode",Wa,59);S("_setClientInfo",Ia,66,2);S("_setAccount",za,3);S("_setNamespace",Aa,48);S("_setAllowLinker",Fa,11,2);S("_setDetectFlash",Ja,61,2);S("_setDetectTitle",La,62,2);S("_setLocalGifPath",Va,46,0);S("_setLocalServerMode",Wa,92,g,0);S("_setRemoteServerMode",
Wa,63,g,1);S("_setLocalRemoteServerMode",Wa,47,g,2);S("_setSampleRate",Ua,45,1);S("_setCampaignTrack",Ka,36,2);S("_setAllowAnchor",Ga,7,2);S("_setCampNameKey",Na,41);S("_setCampContentKey",Sa,38);S("_setCampIdKey",Ma,39);S("_setCampMediumKey",Qa,40);S("_setCampNOKey",Ta,42);S("_setCampSourceKey",Pa,43);S("_setCampTermKey",Ra,44);S("_setCampCIdKey",Oa,37);S("_setCookiePath",L,9,0);S("_setMaxCustomVariables",Xa,0,1);S("_setVisitorCookieTimeout",Ca,28,1);S("_setSessionCookieTimeout",Da,26,1);S("_setCampaignCookieTimeout",
Ea,29,1);S("_setReferrerOverride",fb,49);a("_trackPageview",Q[s].ka,1);a("_trackEvent",Q[s].t,4);a("_trackSocial",Q[s].la,104);a("_trackPageLoadTime",Q[s].ja,100);a("_trackTrans",Q[s].ma,18);a("_sendXEvent",Q[s].s,78);a("_createEventTracker",Q[s].S,74);a("_getVersion",Q[s].X,60);a("_setDomainName",Q[s].r,6);a("_setAllowHash",Q[s].ba,8);a("_getLinkerUrl",Q[s].W,52);a("_link",Q[s].link,101);a("_linkByPost",Q[s].aa,102);a("_setTrans",Q[s].ea,20);a("_addTrans",Q[s].L,21);a("_addItem",Q[s].J,19);a("_setTransactionDelim",
Q[s].fa,82);a("_setCustomVar",Q[s].ca,10);a("_deleteCustomVar",Q[s].U,35);a("_getVisitorCustomVar",Q[s].Y,50);a("_setXKey",Q[s].ha,83);a("_setXValue",Q[s].ia,84);a("_getXKey",Q[s].Z,76);a("_getXValue",Q[s].$,77);a("_clearXKey",Q[s].P,72);a("_clearXValue",Q[s].Q,73);a("_createXObj",Q[s].T,75);a("_addIgnoredOrganic",Q[s].H,15);a("_clearIgnoredOrganic",Q[s].M,97);a("_addIgnoredRef",Q[s].I,31);a("_clearIgnoredRef",Q[s].N,32);a("_addOrganic",Q[s].K,14);a("_clearOrganic",Q[s].O,70);a("_cookiePathCopy",
Q[s].R,30);a("_get",Q[s].V,106);a("_set",Q[s].da,107);a("_addEventListener",Q[s].addEventListener,108);a("_removeEventListener",Q[s].removeEventListener,109);a("_initData",Q[s].l,2);a("_setVar",Q[s].ga,22);S("_setSessionTimeout",Da,27,3);S("_setCookieTimeout",Ea,25,3);S("_setCookiePersistence",Ca,24,1);a("_setAutoTrackOutbound",oa,79);a("_setTrackOutboundSubdomains",oa,81);a("_setHrefExamineLimit",oa,80)},P=function(a,b,c,d){a[b]=function(){D(d);return c.apply(this,arguments)}},R=function(a,b,c,d){Q[s][a]=
function(){D(c);return ka(this.a.get(b),d)}},S=function(a,b,c,d,e){Q[s][a]=function(a){D(c);e==g?this.a.set(b,ka(a,d)):this.a.set(b,e)}},ac=function(a,b){return{type:b,target:a,stopPropagation:function(){throw"aborted";}}};var bc=function(a,b){return b!=="/"?!1:(a[m]("www.google.")==0||a[m](".google.")==0||a[m]("google.")==0)&&!(a[m]("google.org")>-1)?!0:!1},cc=function(a){var b=a.get(J),c=a[w](L,"/");bc(b,c)&&a[u]()};var gc=function(){var a={},b={},c=new dc;this.h=function(a,b){c.add(a,b)};var d=new dc;this.d=function(a,b){d.add(a,b)};var e=!1,f=!1,j=!0;this.G=function(){e=!0};this.f=function(a){this[da]();this.set(Mb,a,!0);e=!1;d.execute(this);e=!0;b={};this.i()};this.load=function(){e&&(e=!1,this.na(),ec(this),f||(f=!0,c.execute(this),fc(this),ec(this)),e=!0)};this.i=function(){if(e)if(f)e=!1,fc(this),e=!0;else this[da]()};this.get=function(c){c&&c[l](0)=="_"&&this[da]();return b[c]!==g?b[c]:a[c]};this.set=
function(c,d,e){c&&c[l](0)=="_"&&this[da]();e?b[c]=d:a[c]=d;c&&c[l](0)=="_"&&this.i()};this.m=function(b){a[b]=this.b(b,0)+1};this.b=function(a,b){var c=this.get(a);return c==g||c===""?b:c*1};this.getString=function(a,b){var c=this.get(a);return c==g?b:c+""};this.na=function(){if(j){var b=this[w](J,""),c=this[w](L,"/");bc(b,c)||(a[K]=a[Ha]&&b!=""?ma(b):1,j=!1)}}};gc[s].stopPropagation=function(){throw"aborted";};function T(a,b){for(var b=b||[],c=0;c<b[r];c++){var d=b[c];if(""+a==d||d[m](a+".")==0)return d}return"-"}
var hc=function(a,b){var c=a.b(K,1),d=b[t](".");if(d[r]!==6||d[0]!=c)return!1;var c=d[1]*1,e=d[2]*1,f=d[3]*1,j=d[4]*1,d=d[5]*1;if(!(c>=0&&e>0&&f>0&&j>0&&d>=0))return D(110),!1;a.set(N,c);a.set(sb,e);a.set(tb,f);a.set(ub,j);a.set(vb,d);return!0},ic=function(a){var b=a.get(N),c=a.get(sb),d=a.get(tb),e=a.get(ub),f=a.b(vb,1);b==g?D(113):b==NaN&&D(114);b>=0&&c>0&&d>0&&e>0&&f>=0||D(115);return[a.b(K,1),b!=g?b:"-",c||"-",d||"-",e||"-",f][y](".")},jc=function(a){return[a.b(K,1),a.b(yb,0),a.b(O,1),a.b(zb,
0)][y](".")},kc=function(a,b){var c=b[t]("."),d=a.b(K,1);if(c[r]!==4||c[0]!=d)c=h;a.set(yb,c?c[1]*1:0);a.set(O,c?c[2]*1:10);a.set(zb,c?c[3]*1:a.get(H));return c!=h||b==d},lc=function(a,b){var c=C(a[w](ob,"")),d=[],e=a.get(M);if(!b&&e){for(var f=0;f<e[r];f++){var j=e[f];j&&j[ia]==1&&d[k](f+"="+C(j[ga])+"="+C(j[ea])+"=1")}d[r]>0&&(c+="|"+d[y](","))}return c?a.b(K,1)+"."+c:h},mc=function(a,b){var c=a.b(K,1),d=b[t](".");if(d[r]<2||d[0]!=c)return!1;c=d.slice(1)[y](".")[t]("|");c[r]>0&&a.set(ob,E(c[0]));
if(c[r]<=1)return!0;for(var d=c[1][t](","),e=0;e<d[r];e++){var f=d[e][t]("=");if(f[r]==4){var j={};ca(j,E(f[1]));j.value=E(f[2]);j.scope=1;a.get(M)[f[0]]=j}}c[1][m]("^")>=0&&D(125);return!0},oc=function(a,b){var c=nc(a,b);return c?[a.b(K,1),a.b(Ab,0),a.b(Bb,1),a.b(Cb,1),c][y]("."):""},nc=function(a){function b(b,e){if(!B(a.get(b))){var f=a[w](b,""),f=f[t](" ")[y]("%20"),f=f[t]("+")[y]("%20");c[k](e+"="+f)}}var c=[];b(Eb,"utmcid");b(Ib,"utmcsr");b(Gb,"utmgclid");b(Hb,"utmdclid");b(Fb,"utmccn");b(Jb,
"utmcmd");b(Kb,"utmctr");b(Lb,"utmcct");return c[y]("|")},qc=function(a,b){var c=a.b(K,1),d=b[t](".");if(d[r]<5||d[0]!=c)return a.set(Ab,g),a.set(Bb,g),a.set(Cb,g),a.set(Eb,g),a.set(Fb,g),a.set(Ib,g),a.set(Jb,g),a.set(Kb,g),a.set(Lb,g),a.set(Gb,g),a.set(Hb,g),!1;a.set(Ab,d[1]*1);a.set(Bb,d[2]*1);a.set(Cb,d[3]*1);pc(a,d.slice(4)[y]("."));return!0},pc=function(a,b){function c(a){return(a=b[fa](a+"=(.*?)(?:\\|utm|$)"))&&a[r]==2?a[1]:g}function d(b,c){c&&(c=e?E(c):c[t]("%20")[y](" "),a.set(b,c))}b[m]("=")==
-1&&(b=E(b));var e=c("utmcvr")=="2";d(Eb,c("utmcid"));d(Fb,c("utmccn"));d(Ib,c("utmcsr"));d(Jb,c("utmcmd"));d(Kb,c("utmctr"));d(Lb,c("utmcct"));d(Gb,c("utmgclid"));d(Hb,c("utmdclid"))};var dc=function(){this.q=[]};dc[s].add=function(a,b){this.q[k]({name:a,ua:b})};dc[s].execute=function(a){try{for(var b=0;b<this.q[r];b++)this.q[b].ua.call(U,a)}catch(c){}};function rc(a){a.get(Ua)!=100&&a.get(N)%1E4>=a.get(Ua)*100&&a[u]()}function sc(a){tc()&&a[u]()}function uc(a){F[v].protocol=="file:"&&a[u]()}function vc(a){a.get(eb)||a.set(eb,F.title,!0);a.get(db)||a.set(db,F[v].pathname+F[v].search,!0)};var wc=new function(){var a=[];this.set=function(b){a[b]=!0};this.va=function(){for(var b=[],c=0;c<a[r];c++)a[c]&&(b[i.floor(c/6)]^=1<<c%6);for(c=0;c<b[r];c++)b[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"[l](b[c]||0);return b[y]("")+"~"}};function D(a){wc.set(a)};var U=window,F=document,tc=function(){var a=U._gaUserPrefs;return a&&a.ioo&&a.ioo()},xc=function(a,b){setTimeout(a,b)},V=function(a){for(var b=[],c=F.cookie[t](";"),a=RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$"),d=0;d<c[r];d++){var e=c[d][fa](a);e&&b[k](e[1])}return b},X=function(a,b,c,d,e){var f;f=tc()?!1:bc(d,c)?!1:!0;if(f){if(b&&U[ja].userAgent[m]("Firefox")>=0){b=b.replace(/\n|\r/g," ");f=0;for(var j=b[r];f<j;++f){var p=b.charCodeAt(f)&255;if(p==10||p==13)b=b[x](0,f)+"?"+b[x](f+1)}}b&&b[r]>2E3&&(b=b[x](0,
2E3),D(69));a=a+"="+b+"; path="+c+"; ";e&&(a+="expires="+(new Date((new Date).getTime()+e)).toGMTString()+"; ");d&&(a+="domain="+d+";");F.cookie=a}};var yc,zc,Ac=function(){if(!yc){var a={},b=U[ja],c=U.screen;a.C=c?c.width+"x"+c.height:"-";a.B=c?c.colorDepth+"-bit":"-";a.language=(b&&(b.language||b.browserLanguage)||"-")[z]();a.javaEnabled=b&&b.javaEnabled()?1:0;a.characterSet=F.characterSet||F.charset||"-";yc=a}},Bc=function(){Ac();for(var a=yc,b=U[ja],a=b.appName+b.version+a.language+b.platform+b.userAgent+a.javaEnabled+a.C+a.B+(F.cookie?F.cookie:"")+(F.referrer?F.referrer:""),b=a[r],c=U.history[r];c>0;)a+=c--^b++;return ma(a)},Cc=function(a){Ac();
var b=yc;a.set(hb,b.C);a.set(ib,b.B);a.set(lb,b.language);a.set(mb,b.characterSet);a.set(jb,b.javaEnabled);if(a.get(Ia)&&a.get(Ja)){if(!(b=zc)){var c,d,e;d="ShockwaveFlash";if((b=(b=U[ja])?b.plugins:g)&&b[r]>0)for(c=0;c<b[r]&&!e;c++)d=b[c],d[ga][m]("Shockwave Flash")>-1&&(e=d.description[t]("Shockwave Flash ")[1]);else{d=d+"."+d;try{c=new ActiveXObject(d+".7"),e=c.GetVariable("$version")}catch(f){}if(!e)try{c=new ActiveXObject(d+".6"),e="WIN 6,0,21,0",c.AllowScriptAccess="always",e=c.GetVariable("$version")}catch(j){}if(!e)try{c=
new ActiveXObject(d),e=c.GetVariable("$version")}catch(p){}e&&(e=e[t](" ")[1][t](","),e=e[0]+"."+e[1]+" r"+e[2])}b=e?e:"-"}zc=b;a.set(kb,zc)}else a.set(kb,"-")};var Y=function(){P(Y[s],"push",Y[s][k],5);P(Y[s],"_createAsyncTracker",Y[s].wa,33);P(Y[s],"_getAsyncTracker",Y[s].xa,34)};Y[s].wa=function(a,b){return Z.k(a,b||"")};Y[s].xa=function(a){return Z.p(a)};Y[s].push=function(a){for(var b=arguments,c=0,d=0;d<b[r];d++)try{if(typeof b[d]==="function")b[d]();else{var e="",f=b[d][0],j=f.lastIndexOf(".");j>0&&(e=f[x](0,j),f=f[x](j+1));var p=e=="_gat"?Z:e=="_gaq"?Dc:Z.p(e);p[f].apply(p,b[d].slice(1))}}catch(n){c++}return c};var Gc=function(){function a(a,b,c,d){g==f[a]&&(f[a]={});g==f[a][b]&&(f[a][b]=[]);f[a][b][c]=d}function b(a,b,c){if(g!=f[a]&&g!=f[a][b])return f[a][b][c]}function c(a,b){if(g!=f[a]&&g!=f[a][b]){f[a][b]=g;var c=!0,d;for(d=0;d<j[r];d++)if(g!=f[a][j[d]]){c=!1;break}c&&(f[a]=g)}}function d(a){var b="",c=!1,d,e;for(d=0;d<j[r];d++)if(e=a[j[d]],g!=e){c&&(b+=j[d]);for(var c=[],f=g,W=g,W=0;W<e[r];W++)if(g!=e[W]){f="";W!=kd&&g==e[W-1]&&(f+=W[o]()+pb);for(var Ic=e[W],Jc="",qb=g,Rb=g,Sb=g,qb=0;qb<Ic[r];qb++)Rb=
Ic[l](qb),Sb=I[Rb],Jc+=g!=Sb?Sb:Rb;f+=Jc;c[k](f)}b+=p+c[y](q)+n;c=!1}else c=!0;return b}var e=this,f=[],j=["k","v"],p="(",n=")",q="*",pb="!",I={"'":"'0"};I[n]="'1";I[q]="'2";I[pb]="'3";var kd=1;e.qa=function(a){return g!=f[a]};e.n=function(){for(var a="",b=0;b<f[r];b++)g!=f[b]&&(a+=b[o]()+d(f[b]));return a};e.pa=function(a){if(a==g)return e.n();for(var b=a.n(),c=0;c<f[r];c++)g!=f[c]&&!a.qa(c)&&(b+=c[o]()+d(f[c]));return b};e.e=function(b,c,d){if(!Ec(d))return!1;a(b,"k",c,d);return!0};e.j=function(b,
c,d){if(!Fc(d))return!1;a(b,"v",c,d[o]());return!0};e.w=function(a,c){return b(a,"k",c)};e.z=function(a,c){return b(a,"v",c)};e.u=function(a){c(a,"k")};e.v=function(a){c(a,"v")};P(e,"_setKey",e.e,89);P(e,"_setValue",e.j,90);P(e,"_getKey",e.w,87);P(e,"_getValue",e.z,88);P(e,"_clearKey",e.u,85);P(e,"_clearValue",e.v,86)};function Ec(a){return typeof a=="string"}function Fc(a){return typeof a!="number"&&(g==Number||!(a instanceof Number))||i.round(a)!=a||a==NaN||a==Infinity?!1:!0};var Hc=function(a){var b=U.gaGlobal;a&&!b&&(U.gaGlobal=b={});return b},Kc=function(){var a=Hc(!0).hid;if(a==h)a=na(),Hc(!0).hid=a;return a},Lc=function(a){a.set(gb,Kc());var b=Hc();if(b&&b.dh==a.get(K)){var c=b.sid;c&&(c=="0"&&D(112),a.set(ub,c),a.get(nb)&&a.set(tb,c));b=b.vid;a.get(nb)&&b&&(b=b[t]("."),b[1]*1||D(112),a.set(N,b[0]*1),a.set(sb,b[1]*1))}};var Mc,Nc=function(a,b,c){var d=a[w](J,""),e=a[w](L,"/"),a=a.b(Ca,0);X(b,c,e,d,a)},fc=function(a){var b=a[w](J,"");a.b(K,1);var c=a[w](L,"/");X("__utma",ic(a),c,b,a.get(Ca));X("__utmb",jc(a),c,b,a.get(Da));X("__utmc",""+a.b(K,1),c,b);var d=oc(a,!0);d?X("__utmz",d,c,b,a.get(Ea)):X("__utmz","",c,b,-1);(d=lc(a,!1))?X("__utmv",d,c,b,a.get(Ca)):X("__utmv","",c,b,-1)},ec=function(a){var b=a.b(K,1);if(!hc(a,T(b,V("__utma"))))return a.set(rb,!0),!1;var c=!kc(a,T(b,V("__utmb"))),d=T(b,V("__utmc"))!=a.b(K,
1);d&&!c&&D(116);a.set(xb,c||d);qc(a,T(b,V("__utmz")));mc(a,T(b,V("__utmv")));Mc=!c;return!0},Oc=function(a){!Mc&&!(V("__utmb")[r]>0)&&(X("__utmd","1",a[w](L,"/"),a[w](J,""),1E4),V("__utmd")[r]==0&&a[u]())};var Qc=function(a){a.get(N)==g?Pc(a):a.get(rb)&&!a.get(Yb)?Pc(a):a.get(xb)&&(a.set(tb,a.get(ub)),a.set(ub,a.get(H)),a.m(vb),a.set(wb,!0),a.set(yb,0),a.set(O,10),a.set(zb,a.get(H)),a.set(xb,!1))},Pc=function(a){var b=a.get(H);a.set(nb,!0);a.set(N,na()^Bc(a)&2147483647);a.set(ob,"");a.set(sb,b);a.set(tb,b);a.set(ub,b);a.set(vb,1);a.set(wb,!0);a.set(yb,0);a.set(O,10);a.set(zb,b);a.set(M,[]);a.set(rb,!1);a.set(xb,!1)};var Rc="daum:q,eniro:search_word,naver:query,pchome:q,images.google:q,google:q,yahoo:p,yahoo:q,msn:q,bing:q,aol:query,aol:encquery,aol:q,lycos:query,ask:q,altavista:q,netscape:query,cnn:query,about:terms,mamma:q,alltheweb:q,voila:rdata,virgilio:qs,live:q,baidu:wd,alice:qs,yandex:text,najdi:q,mama:query,seznam:q,search:q,wp:szukaj,onet:qt,szukacz:q,yam:k,kvasir:q,sesam:q,ozu:q,terra:query,mynet:q,ekolay:q,rambler:query".split(","),Xc=function(a){if(a.get(Ka)&&!a.get(Yb)){for(var b=!B(a.get(Eb))||!B(a.get(Ib))||
!B(a.get(Gb))||!B(a.get(Hb)),c={},d=0;d<Sc[r];d++){var e=Sc[d];c[e]=a.get(e)}d=va(F[v].href,a.get(Ga));if(!(sa(d.c.get(a.get(Ta)))=="1"&&b)&&(!Tc(a,d)&&!Uc(a)&&!b&&a.get(wb)&&a.get(wb)&&Vc(a,g,"(direct)",g,g,"(direct)","(none)",g,g),a.set(Db,Wc(a,c)),b=a.get(Ib)=="(direct)"&&a.get(Fb)=="(direct)"&&a.get(Jb)=="(none)",a.get(Db)||a.get(wb)&&!b))a.set(Ab,a.get(H)),a.set(Bb,a.get(vb)),a.m(Cb)}},Tc=function(a,b){function c(c,d){var d=d||"-",e=sa(b.c.get(a.get(c)));return e&&e!="-"?E(e):d}var d=sa(b.c.get(a.get(Ma)))||
"-",e=sa(b.c.get(a.get(Pa)))||"-",f=sa(b.c.get(a.get(Oa)))||"-",j=sa(b.c.get("dclid"))||"-",p=c(Na,"(not set)"),n=c(Qa,"(not set)"),q=c(Ra),pb=c(Sa);if(B(d)&&B(f)&&B(j)&&B(e))return!1;if(B(q)){var I=xa(a.get(fb),a.get(L)),I=va(I,!0);(I=Yc(a,I))&&!B(I[1]&&!I[2])&&(q=I[1])}Vc(a,d,e,f,j,p,n,q,pb);return!0},Uc=function(a){var b=xa(a.get(fb),a.get(L)),c=va(b,!0);if(!(b!=g&&b!=h&&b!=""&&b!="0"&&b!="-"&&b[m]("://")>=0)||c&&c[ha][m]("google")>-1&&c.c.contains("q")&&c.path=="cse")return!1;if((b=Yc(a,c))&&
!b[2])return Vc(a,g,b[0],g,g,"(organic)","organic",b[1],g),!0;else if(b)return!1;if(a.get(wb))a:{for(var b=a.get($a),d=ua(c[ha]),e=0;e<b[r];++e)if(d[m](b[e])>-1){a=!1;break a}Vc(a,g,d,g,g,"(referral)","referral",g,"/"+c.path);a=!0}else a=!1;return a},Yc=function(a,b){for(var c=a.get(Ya),d=0;d<c[r];++d){var e=c[d][t](":");if(b[ha][m](e[0][z]())>-1){var f=ra(b.c.get(e[1]));if(f){a:{for(var c=f,d=a.get(Za),c=E(c)[z](),j=0;j<d[r];++j)if(c==d[j]){c=!0;break a}c=!1}return[e[0],f,c]}}}return h},Vc=function(a,
b,c,d,e,f,j,p,n){a.set(Eb,b);a.set(Ib,c);a.set(Gb,d);a.set(Hb,e);a.set(Fb,f);a.set(Jb,j);a.set(Kb,p);a.set(Lb,n)},Sc=[Fb,Eb,Gb,Hb,Ib,Jb,Kb,Lb],Wc=function(a,b){for(var c=0;c<Sc[r];c++){var d=Sc[c],e=b[d]||"-",d=a.get(d)||"-";if(e!=d)return!0}return!1};var $c=function(a){Zc(a,F[v].href)?(a.set(Yb,!0),D(12)):a.set(Yb,!1)},Zc=function(a,b){if(!a.get(Fa))return!1;var c=a.b(K,1),d=va(b,a.get(Ga)),e=T(c,d.c.get("__utma")),f=T(c,d.c.get("__utmb")),j=T(c,d.c.get("__utmc")),p=T(c,d.c.get("__utmx")),n=T(c,d.c.get("__utmz")),q=T(c,d.c.get("__utmv")),d=ra(d.c.get("__utmk"));if(ma(""+e+f+j+p+n+q)!=d)return!1;if(!hc(a,e))return e&&e[m](c+".")!=0&&D(126),!1;kc(a,f);a.b(K,1);qc(a,n);mc(a,q);c=E(p);e=a.b(K,1);f=c[t](".");f[r]<2||f[0]!=e||Nc(a,"__utmx",c);return!0},
ad=function(a,b,c){var d;a.b(K,1);d=ic(a)||"-";var e=jc(a)||"-",f=""+a.b(K,1)||"-",j=ra(V("__utmx"))||"-",p=oc(a,!1)||"-",a=lc(a,!1)||"-",n=ma(""+d+e+f+j+p+a),q=[];q[k]("__utma="+d);q[k]("__utmb="+e);q[k]("__utmc="+f);q[k]("__utmx="+j);q[k]("__utmz="+p);q[k]("__utmv="+a);q[k]("__utmk="+n);d=q[y]("&");if(!d)return b;e=b[m]("#");return c?e<0?b+"#"+d:b+"&"+d:(c="",f=b[m]("?"),e>0&&(c=b[x](e),b=b[x](0,e)),f<0?b+"?"+d+c:b+"&"+d+c)};var bd="|",dd=function(a,b,c,d,e,f,j,p,n){var q=cd(a,b);q||(q={},a.get(ab)[k](q));q.id_=b;q.affiliation_=c;q.total_=d;q.tax_=e;q.shipping_=f;q.city_=j;q.state_=p;q.country_=n;q.items_=[];return q},ed=function(a,b,c,d,e,f,j){var a=cd(a,b)||dd(a,b,"",0,0,0,"","",""),p;a:{if(a&&a.items_){p=a.items_;for(var n=0;n<p[r];n++)if(p[n].sku_==c){p=p[n];break a}}p=h}n=p||{};n.transId_=b;n.sku_=c;n.name_=d;n.category_=e;n.price_=f;n.quantity_=j;p||a.items_[k](n);return n},cd=function(a,b){for(var c=a.get(ab),
d=0;d<c[r];d++)if(c[d].id_==b)return c[d];return h};var fd,gd=function(a){var f;var e;if(!fd){var b;b=F[v].hash;var c=U[ga],d=/^#?gaso=([^&]*)/;if(f=(e=(b=b&&b[fa](d)||c&&c[fa](d))?b[1]:ra(V("GASO")),b=e)&&b[fa](/^(?:\|([-0-9a-z.]{1,30})\|)?([-.\w]{10,1200})$/i),c=f)if(Nc(a,"GASO",""+b),Z._gasoDomain=a.get(J),Z._gasoCPath=a.get(L),b="https://"+((c[1]||"www")+".google.com")+"/analytics/reporting/overlay_js?gaso="+c[2]+"&"+na())a=F.createElement("script"),a.type="text/javascript",a.async=!0,a.src=b,a.id="_gasojs",a.onload=g,b=F.getElementsByTagName("script")[0],
b.parentNode.insertBefore(a,b);fd=!0}};var ld=function(a,b){if(a.b(N,0)%100>=a.b(Xb,0))return!1;var c=hd();c==g&&(c=id());if(c==g||c==Infinity||isNaN(c))return!1;c>0?b(jd(c)):pa(U,"load",function(){ld(a,b)},!1);return!0},jd=function(a){var b=new Gc,c=i.min(i.floor(a/100),5E3);b.e(14,1,c>0?c+"00":"0");b.j(14,1,a);return b},hd=function(){var a=U.performance||U.webkitPerformance;return(a=a&&a.timing)&&a.loadEventStart-a.fetchStart},id=function(){if(U.top==U){var a=U.external,b=a&&a.onloadT;a&&!a.isValidLoadTime&&(b=g);b>2147483648&&(b=g);
b>0&&a.setPageReadyTime();return b}};var Q=function(a,b,c){function d(a){return function(b){if((b=b.get(Zb)[a])&&b[r])for(var c=ac(e,a),d=0;d<b[r];d++)b[d].call(e,c)}}var e=this;this.a=new gc;this.get=function(a){return this.a.get(a)};this.set=function(a,b,c){this.a.set(a,b,c)};this.set(za,b||"UA-XXXXX-X");this.set(Ba,a||"");this.set(Aa,c||"");this.set(H,i.round((new Date).getTime()/1E3));this.set(L,"/");this.set(Ca,63072E6);this.set(Ea,15768E6);this.set(Da,18E5);this.set(Fa,!1);this.set(Xa,50);this.set(Ga,!1);this.set(Ha,!0);this.set(Ia,
!0);this.set(Ja,!0);this.set(Ka,!0);this.set(La,!0);this.set(Na,"utm_campaign");this.set(Ma,"utm_id");this.set(Oa,"gclid");this.set(Pa,"utm_source");this.set(Qa,"utm_medium");this.set(Ra,"utm_term");this.set(Sa,"utm_content");this.set(Ta,"utm_nooverride");this.set(Ua,100);this.set(Xb,10);this.set(Va,"/__utm.gif");this.set(Wa,1);this.set(ab,[]);this.set(M,[]);this.set(Ya,Rc);this.set(Za,[]);this.set($a,[]);this.r("auto");this.set(fb,F.referrer);this.set(Zb,{hit:[],load:[]});this.a.h("0",$c);this.a.h("1",
Qc);this.a.h("2",Xc);this.a.h("4",d("load"));this.a.h("5",gd);this.a.d("A",sc);this.a.d("B",uc);this.a.d("C",Qc);this.a.d("D",rc);this.a.d("E",cc);this.a.d("F",md);this.a.d("G",Oc);this.a.d("H",vc);this.a.d("I",Cc);this.a.d("J",Lc);this.a.d("K",d("hit"));this.a.d("L",nd);this.a.d("M",od);this.get(H)===0&&D(111);this.a.G()};A=Q[s];A.g=function(){var a=this.get(bb);a||(a=new Gc,this.set(bb,a));return a};
A.oa=function(a){for(var b in a){var c=a[b];a.hasOwnProperty(b)&&typeof c!="function"&&this.set(b,c,!0)}};A.ka=function(a){a&&a!=g&&(a.constructor+"")[m]("String")>-1?(D(13),this.set(db,a,!0)):typeof a==="object"&&a!==h&&this.oa(a);this.a.f("page")};A.t=function(a,b,c,d){if(a==""||!Ec(a)||b==""||!Ec(b))return!1;if(c!=g&&!Ec(c))return!1;if(d!=g&&!Fc(d))return!1;this.set(Ob,a,!0);this.set(Pb,b,!0);this.set(Qb,c,!0);this.set(Tb,d,!0);this.a.f("event");return!0};
A.la=function(a,b,c,d){if(!a||!b)return!1;this.set(Ub,a[x](0,15),!0);this.set(Vb,b[x](0,15),!0);this.set(Wb,c||F[v].href,!0);d&&this.set(db,d,!0);this.a.f("social");return!0};A.ja=function(){var a=this;return ld(this.a,function(b){a.s(b)})};A.ma=function(){this.a.f("trans")};A.s=function(a){this.set(cb,a,!0);this.a.f("event")};A.S=function(a){this.l();var b=this;return{_trackEvent:function(c,d,e){D(91);b.t(a,c,d,e)}}};A.V=function(a){return this.get(a)};
A.da=function(a,b){if(a)if(a!=g&&(a.constructor+"")[m]("String")>-1)this.set(a,b);else if(typeof a=="object")for(var c in a)a.hasOwnProperty(c)&&this.set(c,a[c])};A.addEventListener=function(a,b){var c=this.get(Zb)[a];c&&c[k](b)};A.removeEventListener=function(a,b){for(var c=this.get(Zb)[a],d=0;c&&d<c[r];d++)if(c[d]==b){c.splice(d,1);break}};A.X=function(){return"5.1.2"};A.r=function(a){this.get(Ha);a=a=="auto"?ua(F.domain):!a||a=="-"||a=="none"?"":a[z]();this.set(J,a)};
A.ba=function(a){this.set(Ha,!!a)};A.W=function(a,b){return ad(this.a,a,b)};A.link=function(a,b){if(this.a.get(Fa)&&a){var c=ad(this.a,a,b);F[v].href=c}};A.aa=function(a,b){this.a.get(Fa)&&a&&a.action&&(a.action=ad(this.a,a.action,b))};
A.ea=function(){this.l();var a=this.a,b=F.getElementById?F.getElementById("utmtrans"):F.utmform&&F.utmform.utmtrans?F.utmform.utmtrans:h;if(b&&b[ea]){a.set(ab,[]);for(var b=b[ea][t]("UTM:"),c=0;c<b[r];c++){b[c]=la(b[c]);for(var d=b[c][t](bd),e=0;e<d[r];e++)d[e]=la(d[e]);"T"==d[0]?dd(a,d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]):"I"==d[0]&&ed(a,d[1],d[2],d[3],d[4],d[5],d[6])}}};A.L=function(a,b,c,d,e,f,j,p){return dd(this.a,a,b,c,d,e,f,j,p)};A.J=function(a,b,c,d,e,f){return ed(this.a,a,b,c,d,e,f)};
A.fa=function(a){bd=a||"|"};A.ca=function(a,b,c,d){var e=this.a;if(a<=0||a>e.get(Xa))a=!1;else if(!b||!c||C(b)[r]+C(c)[r]>64)a=!1;else{d!=1&&d!=2&&(d=3);var f={};ca(f,b);f.value=c;f.scope=d;e.get(M)[a]=f;a=!0}a&&this.a.i();return a};A.U=function(a){this.a.get(M)[a]=g;this.a.i()};A.Y=function(a){return(a=this.a.get(M)[a])&&a[ia]==1?a[ea]:g};A.ha=function(a,b,c){this.g().e(a,b,c)};A.ia=function(a,b,c){this.g().j(a,b,c)};A.Z=function(a,b){return this.g().w(a,b)};
A.$=function(a,b){return this.g().z(a,b)};A.P=function(a){this.g().u(a)};A.Q=function(a){this.g().v(a)};A.T=function(){return new Gc};A.H=function(a){a&&this.get(Za)[k](a[z]())};A.M=function(){this.set(Za,[])};A.I=function(a){a&&this.get($a)[k](a[z]())};A.N=function(){this.set($a,[])};A.K=function(a,b,c){if(a&&b){var d=this.get(Ya);d.splice(c?0:d[r],0,a+":"+b[z]())}};A.O=function(){this.set(Ya,[])};
A.R=function(a){this.a[da]();var b=this.get(L),c=ra(V("__utmx"))||"";this.set(L,a);this.a.i();Nc(this.a,"__utmx",c);this.set(L,b)};A.l=function(){this.a[da]()};A.ga=function(a){a&&a!=""&&(this.set(ob,a),this.a.f("var"))};var md=function(a){a.get(Mb)!=="trans"&&a.b(yb,0)>=500&&a[u]();if(a.get(Mb)==="event"){var b=(new Date).getTime(),c=a.b(zb,0),d=a.b(ub,0),c=i.floor(0.2*((b-(c!=d?c:c*1E3))/1E3));c>0&&(a.set(zb,b),a.set(O,i.min(10,a.b(O,0)+c)));a.b(O,0)<=0&&a[u]()}},od=function(a){a.get(Mb)==="event"&&a.set(O,i.max(0,a.b(O,10)-1))};var pd=function(){var a=[];this.add=function(b,c,d){d&&(c=C(""+c));a[k](b+"="+c)};this.toString=function(){return a[y]("&")}},qd=function(a,b){(b||a.get(Wa)!=2)&&a.m(yb)},rd=function(a,b){b.add("utmwv","5.1.2");b.add("utms",a.get(yb));b.add("utmn",na());var c=F[v].hostname;B(c)||b.add("utmhn",c,!0);c=a.get(Ua);c!=100&&b.add("utmsp",c,!0)},td=function(a,b){b.add("utmac",a.get(za));sd(a,b);Z.o&&b.add("aip",1);b.add("utmu",wc.va())},sd=function(a,b){function c(a,b){b&&d[k](a+"="+b+";")}var d=[];c("__utma",
ic(a));c("__utmz",oc(a,!1));c("__utmv",lc(a,!0));c("__utmx",ra(V("__utmx")));b.add("utmcc",d[y]("+"),!0)},ud=function(a,b){a.get(Ia)&&(b.add("utmcs",a.get(mb),!0),b.add("utmsr",a.get(hb)),b.add("utmsc",a.get(ib)),b.add("utmul",a.get(lb)),b.add("utmje",a.get(jb)),b.add("utmfl",a.get(kb),!0))},vd=function(a,b){a.get(La)&&a.get(eb)&&b.add("utmdt",a.get(eb),!0);b.add("utmhid",a.get(gb));b.add("utmr",xa(a.get(fb),a.get(L)),!0);b.add("utmp",C(a.get(db),!0),!0)},wd=function(a,b){for(var c=a.get(bb),d=a.get(cb),
e=a.get(M)||[],f=0;f<e[r];f++){var j=e[f];j&&(c||(c=new Gc),c.e(8,f,j[ga]),c.e(9,f,j[ea]),j[ia]!=3&&c.e(11,f,""+j[ia]))}!B(a.get(Ob))&&!B(a.get(Pb))&&(c||(c=new Gc),c.e(5,1,a.get(Ob)),c.e(5,2,a.get(Pb)),e=a.get(Qb),e!=g&&c.e(5,3,e),e=a.get(Tb),e!=g&&c.j(5,1,e));c?b.add("utme",c.pa(d),!0):d&&b.add("utme",d.n(),!0)},xd=function(a,b,c){var d=new pd;qd(a,c);rd(a,d);d.add("utmt","tran");d.add("utmtid",b.id_,!0);d.add("utmtst",b.affiliation_,!0);d.add("utmtto",b.total_,!0);d.add("utmttx",b.tax_,!0);d.add("utmtsp",
b.shipping_,!0);d.add("utmtci",b.city_,!0);d.add("utmtrg",b.state_,!0);d.add("utmtco",b.country_,!0);!c&&td(a,d);return d[o]()},yd=function(a,b,c){var d=new pd;qd(a,c);rd(a,d);d.add("utmt","item");d.add("utmtid",b.transId_,!0);d.add("utmipc",b.sku_,!0);d.add("utmipn",b.name_,!0);d.add("utmiva",b.category_,!0);d.add("utmipr",b.price_,!0);d.add("utmiqt",b.quantity_,!0);!c&&td(a,d);return d[o]()},zd=function(a,b){var c=a.get(Mb);if(c=="page")c=new pd,qd(a,b),rd(a,c),wd(a,c),ud(a,c),vd(a,c),!b&&td(a,
c),c=[c[o]()];else if(c=="event")c=new pd,qd(a,b),rd(a,c),c.add("utmt","event"),wd(a,c),ud(a,c),vd(a,c),!b&&td(a,c),c=[c[o]()];else if(c=="var")c=new pd,qd(a,b),rd(a,c),c.add("utmt","var"),!b&&td(a,c),c=[c[o]()];else if(c=="trans")for(var c=[],d=a.get(ab),e=0;e<d[r];++e){c[k](xd(a,d[e],b));for(var f=d[e].items_,j=0;j<f[r];++j)c[k](yd(a,f[j],b))}else c=="social"?b?c=[]:(c=new pd,qd(a,b),rd(a,c),c.add("utmt","social"),c.add("utmsn",a.get(Ub),!0),c.add("utmsa",a.get(Vb),!0),c.add("utmsid",a.get(Wb),
!0),wd(a,c),ud(a,c),vd(a,c),td(a,c),c=[c[o]()]):c=[];return c},nd=function(a){var b,c=a.get(Nb),d=a.get(Wa);if(d==0||d==2){var e=a.get(Va)+"?";b=zd(a,!0);for(var f=0,j=b[r];f<j;f++)Ad(b[f],d!=2&&f==j-1&&c,e,!0)}if(d==1||d==2){b=zd(a);f=0;for(j=b[r];f<j;f++)try{Ad(b[f],f==j-1&&c)}catch(p){var d=a,e=p,n=new pd;n.add("err",e[ga]);n.add("max",e.message);n.add("len",e.D);n.add("utmwv","5.1.2e");n.add("utmac",d.get(za));n.add("utmn",na());Z.o&&n.add("aip",1);Ad(n[o]())}}};var Bd="https:"==F[v].protocol?"https://ssl.google-analytics.com":"http://www.google-analytics.com",Cd=function(a){ca(this,"len");this.message=8192;this.D=a},Dd=function(a){ca(this,"ff2post");this.message=2036;this.D=a},Ad=function(a,b,c,d){b=b||oa;if(d||a[r]<=2036)Ed(a,b,c);else if(a[r]<=8192){if(U[ja].userAgent[m]("Firefox")>=0&&![].reduce)throw new Dd(a[r]);Fd(a,b)||Gd(a,b)}else throw new Cd(a[r]);},Ed=function(a,b,c){var c=c||Bd+"/__utm.gif?",d=new Image(1,1);d.src=c+a;d.onload=function(){d.onload=
h;b()}},Fd=function(a,b){var c,d=Bd+"/p/__utm.gif",e=U.XDomainRequest;if(e)c=new e,c.open("POST",d);else if(e=U.XMLHttpRequest)e=new e,"withCredentials"in e&&(c=e,c.open("POST",d,!0),c.setRequestHeader("Content-Type","text/plain"));if(c)return c.onreadystatechange=function(){c.readyState==4&&(b(),c=h)},c.send(a),!0},Gd=function(a,b){if(F.body){a=aa(a);try{var c=F.createElement('<iframe name="'+a+'"></iframe>')}catch(d){c=F.createElement("iframe"),ca(c,a)}c.height="0";c.width="0";c.style.display="none";
c.style.visibility="hidden";var e=F[v],e=Bd+"/u/post_iframe.html#"+aa(e.protocol+"//"+e[ha]+"/favicon.ico"),f=function(){c.src="";c.parentNode&&c.parentNode.removeChild(c)};pa(U,"beforeunload",f);var j=!1,p=0,n=function(){if(!j){try{if(p>9||c.contentWindow[v][ha]==F[v][ha]){j=!0;f();qa(U,"beforeunload",f);b();return}}catch(a){}p++;setTimeout(n,200)}};pa(c,"load",n);F.body.appendChild(c);c.src=e}else xc(function(){Gd(a,b)},100)};var $=function(){this.o=!1;this.A={};this.ra=0;this._gasoCPath=this._gasoDomain=g;P($[s],"_createTracker",$[s].k,55);P($[s],"_getTracker",$[s].ta,0);P($[s],"_getTrackerByName",$[s].p,51);P($[s],"_anonymizeIp",$[s].sa,16);$b()};$[s].ta=function(a,b){return this.k(a,g,b)};$[s].k=function(a,b,c){b&&D(23);c&&D(67);b==g&&(b="~"+Z.ra++);return Z.A[b]=new Q(b,a,c)};$[s].p=function(a){a=a||"";return Z.A[a]||Z.k(g,a)};$[s].sa=function(){this.o=!0};var Hd=function(a){if(F.webkitVisibilityState=="prerender")return!1;a();return!0};var Z=new $;var Id=U._gat;Id&&typeof Id._getTracker=="function"?Z=Id:U._gat=Z;var Dc=new Y;(function(a){if(!Hd(a)){D(123);var b=!1,c=function(){!b&&Hd(a)&&(D(124),b=!0,qa(F,"webkitvisibilitychange",c))};pa(F,"webkitvisibilitychange",c)}})(function(){var a=U._gaq,b=!1;if(a&&typeof a[k]=="function"&&(b=Object[s][o].call(Object(a))=="[object Array]",!b)){Dc=a;return}U._gaq=Dc;b&&Dc[k].apply(Dc,a)});})();



// http://apis.google.com/js/plusone.js
window.___jsl=window.___jsl||{};
window.___jsl.h=window.___jsl.h||'r;gc\/23023094-78d85b58';
window.__GOOGLEAPIS=window.__GOOGLEAPIS||{};
window.__GOOGLEAPIS.gwidget=window.__GOOGLEAPIS.gwidget||{};
window.__GOOGLEAPIS.gwidget.superbatch=false;window.__GOOGLEAPIS.iframes=window.__GOOGLEAPIS.iframes||{};
window.__GOOGLEAPIS.iframes.plusone=window.__GOOGLEAPIS.iframes.plusone_m=window.__GOOGLEAPIS.iframes.plusone||{url:':socialhost:/u/:session_index:/_/+1/fastbutton',params:{count:'',size:'',url:''}};window.___gpq=[];
window.gapi=window.gapi||{};
window.gapi.plusone=window.gapi.plusone||(function(){
  function f(n){return function(){window.___gpq.push(n,arguments)}}
  return{go:f('go'),render:f('render')}})();
function __bsld(){var p=window.gapi.plusone=window.googleapisv0.plusone;var f;while(f=window.___gpq.shift()){
  p[f]&&p[f].apply(p,window.___gpq.shift())}
if (gadgets.config.get("gwidget")["parsetags"]!=="explicit"){gapi.plusone.go();}}
window['___jsl'] = window['___jsl'] || {};window['___jsl']['u'] = 'http:\/\/apis.google.com\/js\/plusone.js';window['___jsl']['f'] = ['googleapis.client','plusone'];(window['___jsl']['ci'] = (window['___jsl']['ci'] || [])).push({"gwidget":{"parsetags":"onload","superbatch":false},"iframes":{"sharebox":{"params":{"json":"&"},"url":":socialhost:/u/:session_index:/_/sharebox/dialog"},":socialhost:":"http://apis.google.com","profilecard":{"params":{"style":"#","m":"&"},"url":":socialhost:/u/:session_index:/_/hovercard/appcard"},"plusone_m":{"url":":socialhost:/u/:session_index:/_/+1/fastbutton","params":{"count":"","size":"","url":""}},"plusone":{"url":":socialhost:/u/:session_index:/_/+1/fastbutton","params":{"count":"","size":"","url":""}}},"googleapis.config":{"requestCache":{"enabled":true},"methods":{"chili.people.list":true,"pos.plusones.list":true,"chili.entities.starred.insert":{"cache":{"invalidates":["chili.entities.starred","chili.entitiesDefaultAcl"]}},"chili.people.get":true,"chili.entities.get":true,"pos.plusones.delete":true,"chili.entities.starred.delete":true,"chili.entities.list":true,"pos.plusones.get":true,"chili.groups.list":true,"pos.plusones.getDefaultAcl":{"cache":{"enabled":true}},"chili.entities.starred.get":true,"pos.plusones.insert":true,"chili.activities.list":true,"chili.entitiesDefaultAcl.get":true,"chili.entities.starred.list":true,"chili.activities.get":true,"chili.activities.search":true,"pos.plusones.getSignupState":true},"versions":{"chili":"v1","pos":"v1"},"rpc":"/rpc","transport":{"isProxyShared":true},"sessionCache":{"enabled":true},"proxy":"https://clients6.google.com/static/proxy.html","developerKey":"AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ","jsh":"r;gc/23023094-78d85b58","auth":{"useInterimAuth":false}}});var jsloader=window.jsloader||{};
var gapi=window.gapi||{};
(function(){function g(){return window.___jsl=window.___jsl||{}}function n(b,d,a){a=l(a).join(b);h.length>0&&(a+=d+h.join(b));return a}function l(b){b.sort();for(var d=0,a,c;a=b[d];)a==c?b.splice(d,1):(c=a,++d);return b}function o(b,d){if(b&&d){if(g().c)throw"Cannot continue until a pending callback completes.";g().c=b;g().o=d}}function u(b){if((p||document.readyState)!="loading")return!1;if(typeof window.___gapisync!="undefined")return window.___gapisync;if(b&&(b=b.sync,typeof b!="undefined"))return b;
for(var b=!1,d=document.getElementsByTagName("meta"),a=0,c;c=!b&&d[a];++a)"generator"==c.getAttribute("name")&&"blogger"==c.getAttribute("content")&&(b=!0);return b}function q(b,d){var a;a=b;if(f==="r")a=a.match(v);else{var c=a.match(w);if((a=g().m)&&c){var c=c[2],e=c.lastIndexOf(a);a=(e==0||a.charAt(0)=="."||c.charAt(e-1)==".")&&c.length-a.length==e}else a=!1}if(!a)throw"Cannot load url "+b+".";u(d)?document.write('<script src="'+b+'"><\/script>'):(a=document.createElement("script"),a.setAttribute("src",
b),document.getElementsByTagName("head")[0].appendChild(a))}function r(b,d){f="";h=[];i=window.console||window.opera&&window.opera.postError;j=b;p=d;var a,c=j.match(x)||j.match(y);try{a=c?decodeURIComponent(c[2]):g().h}catch(e){}a&&(a=a.split(";"),f=a.shift(),m=(c=f!=="r")?a.shift():"https://ssl.gstatic.com/webclient/js",k=a.shift(),s=(c=f==="d")&&a.shift()||"gcjs-3p",t=c&&a.shift()||"")}var x=/\?([^&#]*&)*jsh=([^&#]*)/,y=/#([^&]*&)*jsh=([^&]*)/,v=/^https:\/\/ssl.gstatic.com\/webclient\/js(\/[a-zA-Z0-9_\-]+)*\/[a-zA-Z0-9_\-\.:!]+\.js$/,
w=/^(https?:)?\/\/([^/:@]*)(:[0-9]+)?\//,f,m,s,t,k,h,i,j,p;r(document.location.href);jsloader.load=function(b,d){var a;if(!b||b.length==0)i&&i.warn("Cannot load empty features.");else if(f==="d"){var c=m+"/"+n(":","!",b);c+=".js?container="+s+"&c=2&jsload=0";k&&(c+="&r="+k);t=="d"&&(c+="&debug=1");a=c}else f==="r"||f==="f"?a=m+"/"+k+"/"+n("__","--",b)+".js":(c="Cannot respond for features ["+b.join(",")+"].",i&&i.warn(c));d=d||{};if(typeof d==="function"){var c=b,e=d;a?(o(e,1),q(a,void 0),h=l(h.concat(c))):
e&&e()}else{(g().cu=g().cu||[]).push(d.config);var e=d.callback,c=b,j=d;a?(o(e,1),q(a,j),h=l(h.concat(c))):e&&e()}};jsloader.reinitialize_=function(b,d){r(b,d)}})();
gapi.load=function(a,b){jsloader.load(a.split(":"),b)};(window.gapi=window.gapi||{}).load=gapi.load;
gapi.load('googleapis.client:plusone', {'callback': window['__bsld']  });





tgTrackPageview = function () {
	profileIFrame=document.createElement("iframe");
	profileIFrame.name="tg_log_Iframe";
	profileIFrame.src="http://analytics.gazeta.pl/tg.html";
	profileIFrame.width = 0;
	profileIFrame.height = 0;
	profileIFrame.style.display="none";
	document.body.appendChild(profileIFrame)
}

function tgTrackInit() {
	tgAddEvent( window, 'load', tgTrackPageview, true );
}


function tgAddEvent(obj, evType, fn, useCapture){
 if (obj.addEventListener){
  obj.addEventListener(evType, fn, useCapture);
  return true;
 } else if (obj.attachEvent){
  var r = obj.attachEvent("on"+evType, fn);
  return r;
 }
} 

tgTrackInit();					









/*1309303035,169577088,JIT Construction: v398760,pl_PL*/

if(!window.FB)window.FB={_apiKey:null,_session:null,_userStatus:'unknown',_logging:true,_inCanvas:((window.location.search.indexOf('fb_sig_in_iframe=1')>-1)||(window.location.search.indexOf('session=')>-1)||(window.location.search.indexOf('signed_request=')>-1)||(window.name.indexOf('iframe_canvas')>-1)||(window.name.indexOf('app_runner')>-1)),_https:(window.name.indexOf('_fb_https')>-1),_domain:{api:'https://api.facebook.com/',api_read:'https://api-read.facebook.com/',cdn:'http://static.ak.fbcdn.net/',https_cdn:'https://s-static.ak.fbcdn.net/',graph:'https://graph.facebook.com/',staticfb:'http://static.ak.facebook.com/',https_staticfb:'https://s-static.ak.facebook.com/',www:'http://www.facebook.com/',https_www:'https://www.facebook.com/',m:'http://m.facebook.com/',https_m:'https://m.facebook.com/'},_locale:null,_localeIsRtl:false,getDomain:function(a){switch(a){case 'api':return FB._domain.api;case 'api_read':return FB._domain.api_read;case 'cdn':return (window.location.protocol=='https:'||FB._https)?FB._domain.https_cdn:FB._domain.cdn;case 'https_cdn':return FB._domain.https_cdn;case 'graph':return FB._domain.graph;case 'staticfb':return (document.referrer.indexOf('https:')==0||FB._https)?FB._domain.https_staticfb:FB._domain.staticfb;case 'https_staticfb':return FB._domain.https_staticfb;case 'www':return (window.location.protocol=='https:'||FB._https)?FB._domain.https_www:FB._domain.www;case 'https_www':return FB._domain.https_www;case 'm':return (window.location.protocol=='https:'||FB._https)?FB._domain.https_m:FB._domain.m;case 'https_m':return FB._domain.https_m;}},copy:function(d,c,b,e){for(var a in c)if(b||typeof d[a]==='undefined')d[a]=e?e(c[a]):c[a];return d;},create:function(c,h){var e=window.FB,d=c?c.split('.'):[],a=d.length;for(var b=0;b<a;b++){var g=d[b];var f=e[g];if(!f){f=(h&&b+1==a)?h:{};e[g]=f;}e=f;}return e;},provide:function(c,b,a){return FB.copy(typeof c=='string'?FB.create(c):c,b,a);},guid:function(){return 'f'+(Math.random()*(1<<30)).toString(16).replace('.','');},log:function(a){if(FB._logging)if(window.Debug&&window.Debug.writeln){window.Debug.writeln(a);}else if(window.console)window.console.log(a);if(FB.Event)FB.Event.fire('fb.log',a);},$:function(a){return document.getElementById(a);}};
FB.provide('Array',{indexOf:function(a,c){if(a.indexOf)return a.indexOf(c);var d=a.length;if(d)for(var b=0;b<d;b++)if(a[b]===c)return b;return -1;},merge:function(c,b){for(var a=0;a<b.length;a++)if(FB.Array.indexOf(c,b[a])<0)c.push(b[a]);return c;},filter:function(a,c){var b=[];for(var d=0;d<a.length;d++)if(c(a[d]))b.push(a[d]);return b;},keys:function(c,d){var a=[];for(var b in c)if(d||c.hasOwnProperty(b))a.push(b);return a;},map:function(a,d){var c=[];for(var b=0;b<a.length;b++)c.push(d(a[b]));return c;},forEach:function(c,a,f){if(!c)return;if(Object.prototype.toString.apply(c)==='[object Array]'||(!(c instanceof Function)&&typeof c.length=='number')){if(c.forEach){c.forEach(a);}else for(var b=0,e=c.length;b<e;b++)a(c[b],b,c);}else for(var d in c)if(f||c.hasOwnProperty(d))a(c[d],d,c);}});
FB.provide('QS',{encode:function(c,d,a){d=d===undefined?'&':d;a=a===false?function(e){return e;}:encodeURIComponent;var b=[];FB.Array.forEach(c,function(f,e){if(f!==null&&typeof f!='undefined')b.push(a(e)+'='+a(f));});b.sort();return b.join(d);},decode:function(f){var a=decodeURIComponent,d={},e=f.split('&'),b,c;for(b=0;b<e.length;b++){c=e[b].split('=',2);if(c&&c[0])d[a(c[0])]=a(c[1]||'');}return d;}});
FB.provide('Content',{_root:null,_hiddenRoot:null,_callbacks:{},append:function(a,c){if(!c)if(!FB.Content._root){FB.Content._root=c=FB.$('fb-root');if(!c){FB.log('The "fb-root" div has not been created.');return;}else c.className+=' fb_reset';}else c=FB.Content._root;if(typeof a=='string'){var b=document.createElement('div');c.appendChild(b).innerHTML=a;return b;}else return c.appendChild(a);},appendHidden:function(a){if(!FB.Content._hiddenRoot){var b=document.createElement('div'),c=b.style;c.position='absolute';c.top='-10000px';c.width=c.height=0;FB.Content._hiddenRoot=FB.Content.append(b);}return FB.Content.append(a,FB.Content._hiddenRoot);},insertIframe:function(e){e.id=e.id||FB.guid();e.name=e.name||FB.guid();var a=FB.guid(),f=false,d=false;FB.Content._callbacks[a]=function(){if(f&&!d){d=true;e.onload&&e.onload(e.root.firstChild);}};if(FB.UA.mobile()&&!FB.Content._orientationFix){FB.Content._orientationFix=true;orientationFix=function(){if(FB.Dialog._active)FB.Dialog._centerActive(FB.Canvas.getPageInfo());};if("onorientationchange" in window){window.addEventListener("orientationchange",orientationFix);}else window.addEventListener("resize",orientationFix);}if(document.attachEvent){var b=('<iframe'+' id="'+e.id+'"'+' name="'+e.name+'"'+(e.title?' title="'+e.title+'"':'')+(e.className?' class="'+e.className+'"':'')+' style="border:none;'+(e.width?'width:'+e.width+'px;':'')+(e.height?'height:'+e.height+'px;':'')+'"'+' src="'+e.url+'"'+' frameborder="0"'+' scrolling="no"'+' allowtransparency="true"'+' onload="FB.Content._callbacks.'+a+'()"'+'></iframe>');e.root.innerHTML='<iframe src="javascript:false"'+' frameborder="0"'+' scrolling="no"'+' style="height:1px"></iframe>';f=true;window.setTimeout(function(){e.root.innerHTML=b;e.onInsert&&e.onInsert(e.root.firstChild);},0);}else{var c=document.createElement('iframe');c.id=e.id;c.name=e.name;c.onload=FB.Content._callbacks[a];c.scrolling='no';c.style.border='none';c.style.overflow='hidden';if(e.title)c.title=e.title;if(e.className)c.className=e.className;if(e.height)c.style.height=e.height+'px';if(e.width)c.style.width=e.width+'px';e.root.appendChild(c);f=true;c.src=e.url;e.onInsert&&e.onInsert(c);}},submitToTarget:function(c,b){var a=document.createElement('form');a.action=c.url;a.target=c.target;a.method=(b)?'GET':'POST';FB.Content.appendHidden(a);FB.Array.forEach(c.params,function(f,e){if(f!==null&&f!==undefined){var d=document.createElement('input');d.name=e;d.value=f;a.appendChild(d);}});a.submit();a.parentNode.removeChild(a);}});
FB.provide('Flash',{_minVersions:[[9,0,159,0],[10,0,22,87]],_swfPath:'swf/XdComm.swf',_callbacks:[],init:function(){if(FB.Flash._init)return;FB.Flash._init=true;window.FB_OnFlashXdCommReady=function(){FB.Flash._ready=true;for(var a=0,b=FB.Flash._callbacks.length;a<b;a++)FB.Flash._callbacks[a]();FB.Flash._callbacks=[];};FB.Flash.embedSWF('XdComm',FB.getDomain('cdn')+FB.Flash._swfPath);},embedSWF:function(d,e,b){var a=!!document.attachEvent,c=('<object '+'type="application/x-shockwave-flash" '+'id="'+d+'" '+(b?'flashvars="'+b+'" ':'')+(a?'name="'+d+'" ':'')+(a?'':'data="'+e+'" ')+(a?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ':'')+'allowscriptaccess="always">'+'<param name="movie" value="'+e+'"></param>'+'<param name="allowscriptaccess" value="always"></param>'+'</object>');FB.Content.appendHidden(c);},hasMinVersion:function(){if(typeof FB.Flash._hasMinVersion==='undefined'){var i,a,b,h=[];try{i=new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');}catch(j){if(navigator.mimeTypes.length>0){var mimeType='application/x-shockwave-flash';if(navigator.mimeTypes[mimeType].enabledPlugin){var name='Shockwave Flash';i=(navigator.plugins[name+' 2.0']||navigator.plugins[name]).description;}}}if(i){var f=i.replace(/\D+/g,',').match(/^,?(.+),?$/)[1].split(',');for(a=0,b=f.length;a<b;a++)h.push(parseInt(f[a],10));}FB.Flash._hasMinVersion=false;majorVersion:for(a=0,b=FB.Flash._minVersions.length;a<b;a++){var g=FB.Flash._minVersions[a];if(g[0]!=h[0])continue;for(var c=1,d=g.length,e=h.length;(c<d&&c<e);c++)if(h[c]<g[c]){FB.Flash._hasMinVersion=false;continue majorVersion;}else{FB.Flash._hasMinVersion=true;if(h[c]>g[c])break majorVersion;}};}return FB.Flash._hasMinVersion;},onReady:function(a){FB.Flash.init();if(FB.Flash._ready){window.setTimeout(a,0);}else FB.Flash._callbacks.push(a);}});
if(!this.JSON)this.JSON={};(function(){function f(n){return n<10?'0'+n:n;}if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function')value=value.toJSON(key);if(typeof rep==='function')value=rep.call(holder,key,value);switch(typeof value){case 'string':return quote(value);case 'number':return isFinite(value)?String(value):'null';case 'boolean':case 'null':return String(value);case 'object':if(!value)return 'null';gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1)partial[i]=str(i,value)||'null';v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v)partial.push(quote(k)+(gap?': ':':')+v);}}}else for(k in value)if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v)partial.push(quote(k)+(gap?': ':':')+v);}v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}if(typeof JSON.stringify!=='function')JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1)indent+=' ';}else if(typeof space==='string')indent=space;rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number'))throw new Error('JSON.stringify');return str('',{'':value});};if(typeof JSON.parse!=='function')JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object')for(k in value)if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else delete value[k];}return reviver.call(holder,key,value);}cx.lastIndex=0;if(cx.test(text))text=text.replace(cx,function(a){return '\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}throw new SyntaxError('JSON.parse');};}());
FB.provide('JSON',{stringify:function(a){if(window.Prototype&&Object.toJSON){return Object.toJSON(a);}else return JSON.stringify(a);},parse:function(a){return JSON.parse(a);},flatten:function(c){var a={};for(var b in c)if(c.hasOwnProperty(b)){var d=c[b];if(null===d||undefined===d){continue;}else if(typeof d=='string'){a[b]=d;}else a[b]=FB.JSON.stringify(d);}return a;}});
FB.provide('',{api:function(){if(typeof arguments[0]==='string'){FB.ApiServer.graph.apply(FB.ApiServer,arguments);}else FB.ApiServer.rest.apply(FB.ApiServer,arguments);}});FB.provide('ApiServer',{METHODS:['get','post','delete','put'],_callbacks:{},_readOnlyCalls:{fql_query:true,fql_multiquery:true,friends_get:true,notifications_get:true,stream_get:true,users_getinfo:true},graph:function(){var a=Array.prototype.slice.call(arguments),f=a.shift(),d=a.shift(),c,e,b;while(d){var g=typeof d;if(g==='string'&&!c){c=d.toLowerCase();}else if(g==='function'&&!b){b=d;}else if(g==='object'&&!e){e=d;}else{FB.log('Invalid argument passed to FB.api(): '+d);return;}d=a.shift();}c=c||'get';e=e||{};if(f[0]==='/')f=f.substr(1);if(FB.Array.indexOf(FB.ApiServer.METHODS,c)<0){FB.log('Invalid method passed to FB.api(): '+c);return;}FB.ApiServer.oauthRequest('graph',f,c,e,b);},rest:function(e,a){var c=e.method.toLowerCase().replace('.','_');if(FB.Auth&&c==='auth_revokeauthorization'){var d=a;a=function(f){if(f===true)FB.Auth.setSession(null,'notConnected');d&&d(f);};}e.format='json-strings';e.api_key=FB._apiKey;var b=FB.ApiServer._readOnlyCalls[c]?'api_read':'api';FB.ApiServer.oauthRequest(b,'restserver.php','get',e,a);},oauthRequest:function(b,f,c,e,a){if(FB._session&&FB._session.access_token&&!e.access_token)e.access_token=FB._session.access_token;e.sdk='joey';e.pretty=0;var d=a;a=function(h){if(FB.Auth&&h&&FB._session&&FB._session.access_token==e.access_token&&(h.error_code==='190'||(h.error&&(h.error==='invalid_token'||h.error.type==='OAuthException'))))FB.getLoginStatus(null,true);d&&d(h);};try{FB.ApiServer.jsonp(b,f,c,FB.JSON.flatten(e),a);}catch(g){if(FB.Flash.hasMinVersion()){FB.ApiServer.flash(b,f,c,FB.JSON.flatten(e),a);}else throw new Error('Flash is required for this API call.');}},jsonp:function(b,f,d,e,a){var c=FB.guid(),g=document.createElement('script');if(b==='graph'&&d!=='get')e.method=d;e.callback='FB.ApiServer._callbacks.'+c;var h=(FB.getDomain(b)+f+(f.indexOf('?')>-1?'&':'?')+FB.QS.encode(e));if(h.length>2000)throw new Error('JSONP only support a maximum of 2000 bytes of input.');FB.ApiServer._callbacks[c]=function(i){a&&a(i);delete FB.ApiServer._callbacks[c];g.parentNode.removeChild(g);};g.src=h;document.getElementsByTagName('head')[0].appendChild(g);},flash:function(b,e,c,d,a){if(!window.FB_OnXdHttpResult)window.FB_OnXdHttpResult=function(g,f){FB.ApiServer._callbacks[g](decodeURIComponent(f));};FB.Flash.onReady(function(){var h=FB.getDomain(b)+e,f=FB.QS.encode(d);if(c==='get'){if(h.length+f.length>2000){if(b==='graph')d.method='get';c='post';f=FB.QS.encode(d);}else{h+=(h.indexOf('?')>-1?'&':'?')+f;f='';}}else if(c!=='post'){if(b==='graph')d.method=c;c='post';f=FB.QS.encode(d);}var g=document.XdComm.sendXdHttpRequest(c.toUpperCase(),h,f,null);FB.ApiServer._callbacks[g]=function(i){a&&a(FB.JSON.parse(i));delete FB.ApiServer._callbacks[g];};});}});
FB.provide('EventProvider',{subscribers:function(){if(!this._subscribersMap)this._subscribersMap={};return this._subscribersMap;},subscribe:function(b,a){var c=this.subscribers();if(!c[b]){c[b]=[a];}else c[b].push(a);},unsubscribe:function(b,a){var c=this.subscribers()[b];FB.Array.forEach(c,function(e,d){if(e==a)c[d]=null;});},monitor:function(d,a){if(!a()){var b=this,c=function(){if(a.apply(a,arguments))b.unsubscribe(d,c);};this.subscribe(d,c);}},clear:function(a){delete this.subscribers()[a];},fire:function(){var a=Array.prototype.slice.call(arguments),b=a.shift();FB.Array.forEach(this.subscribers()[b],function(c){if(c)c.apply(this,a);});}});FB.provide('Event',FB.EventProvider);
FB.provide('',{bind:function(){var a=Array.prototype.slice.call(arguments),c=a.shift(),b=a.shift();return function(){return c.apply(b,a.concat(Array.prototype.slice.call(arguments)));};},Class:function(b,a,d){if(FB.CLASSES[b])return FB.CLASSES[b];var c=a||function(){};c.prototype=d;c.prototype.bind=function(e){return FB.bind(e,this);};c.prototype.constructor=c;FB.create(b,c);FB.CLASSES[b]=c;return c;},subclass:function(d,b,c,e){if(FB.CLASSES[d])return FB.CLASSES[d];var a=FB.create(b);FB.copy(e,a.prototype);e._base=a;e._callBase=function(g){var f=Array.prototype.slice.call(arguments,1);return a.prototype[g].apply(this,f);};return FB.Class(d,c?c:function(){if(a.apply)a.apply(this,arguments);},e);},CLASSES:{}});FB.provide('Type',{isType:function(a,b){while(a)if(a.constructor===b||a===b){return true;}else a=a._base;return false;}});
FB.Class('Obj',null,FB.copy({setProperty:function(a,b){if(FB.JSON.stringify(b)!=FB.JSON.stringify(this[a])){this[a]=b;this.fire(a,b);}}},FB.EventProvider));
FB.provide('Helper',{isUser:function(a){return a<2.2e+09||(a>=1e+14&&a<=100099999989999);},getLoggedInUser:function(){return FB._session?FB._session.uid:null;},upperCaseFirstChar:function(a){if(a.length>0){return a.substr(0,1).toUpperCase()+a.substr(1);}else return a;},getProfileLink:function(c,b,a){a=a||(c?FB.getDomain('www')+'profile.php?id='+c.uid:null);if(a)b='<a class="fb_link" href="'+a+'">'+b+'</a>';return b;},invokeHandler:function(handler,scope,args){if(handler)if(typeof handler==='string'){eval(handler);}else if(handler.apply)handler.apply(scope,args||[]);},fireEvent:function(a,b){var c=b._attr.href;b.fire(a,c);FB.Event.fire(a,c,b);},executeFunctionByName:function(d){var a=Array.prototype.slice.call(arguments,1);var f=d.split(".");var c=f.pop();var b=window;for(var e=0;e<f.length;e++)b=b[f[e]];return b[c].apply(this,a);}});
FB.provide('TemplateData',{_initialized:false,_version:0,_localStorageTimeout:60*60*24,enabled:function(){return FB.TemplateData._initialized&&FB.TemplateData.supportsLocalStorage()&&FB._userStatus=='connected'&&FB.TemplateData.getResponse();},supportsLocalStorage:function(){try{return 'localStorage' in window&&window.localStorage!==null;}catch(a){return false;}},localStorageStale:function(){var b=FB.TemplateData.getResponse();if(!b||!b.version||b.version!=FB.TemplateData._version)return true;var a=Math.round((new Date()).getTime());return (a-b.setAt)/1000>FB.TemplateData._localStorageTimeout;},getResponse:function(){if(!FB.TemplateData.supportsLocalStorage())return null;return FB.JSON.parse(localStorage.FB_templateDataResponse||"null");},saveResponse:function(a){if(FB.TemplateData.supportsLocalStorage())localStorage.FB_templateDataResponse=FB.JSON.stringify(a);},getData:function(){var a=FB.TemplateData.getResponse();return a?a.data:{};},getCurrentUserID:function(){var a=FB.TemplateData.getResponse();return a?a.currentUserID:0;},init:function(a){if(!a)return;FB.TemplateData._initialized=true;FB.TemplateData._version=a;if(FB.TemplateData.supportsLocalStorage()&&!('FB_templateDataResponse' in localStorage))FB.TemplateData.clear();},clear:function(){FB.TemplateData.saveResponse(null);},update:function(a){if(FB._userStatus!='connected'||FB.TemplateData.getCurrentUserID()!==FB.Helper.getLoggedInUser())FB.TemplateData.clear();if(FB._userStatus=='connected'&&FB.TemplateData.localStorageStale())FB.api({method:'dialog.template_data'},function(c){if('error_code' in c)return;var b={data:c,currentUserID:FB.Helper.getLoggedInUser(),setAt:(new Date()).getTime(),version:FB.TemplateData._version};FB.TemplateData.saveResponse(b);});}});
FB.provide('UA',{ie:function(){return FB.UA._populate()||this._ie;},firefox:function(){return FB.UA._populate()||this._firefox;},opera:function(){return FB.UA._populate()||this._opera;},safari:function(){return FB.UA._populate()||this._safari;},chrome:function(){return FB.UA._populate()||this._chrome;},windows:function(){return FB.UA._populate()||this._windows;},osx:function(){return FB.UA._populate()||this._osx;},linux:function(){return FB.UA._populate()||this._linux;},ios:function(){return FB.UA._populate()||this._ios;},mobile:function(){return FB.UA._populate()||this._mobile;},android:function(){return FB.UA._populate()||this._android;},nativeApp:function(){return !!window.fbrpc||FB.UA._populate()||(navigator.userAgent.match(/Facebook/i))||(this._ios&&!navigator.userAgent.match(/Safari/i));},_populated:false,_populate:function(){if(FB.UA._populated)return;FB.UA._populated=true;var a=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))/.exec(navigator.userAgent);var c=/(Mac OS X)|(Windows)|(Linux)/.exec(navigator.userAgent);var b=/\b(iPhone|iP[ao]d)/.exec(navigator.userAgent);FB.UA._android=navigator.userAgent.match(/Android/i);FB.UA._mobile=b||FB.UA._android||navigator.userAgent.match(/Mobile/i);if(a){FB.UA._ie=a[1]?parseFloat(a[1]):NaN;if(FB.UA._ie>=8&&!window.HTMLCollection)FB.UA._ie=7;FB.UA._firefox=a[2]?parseFloat(a[2]):NaN;FB.UA._opera=a[3]?parseFloat(a[3]):NaN;FB.UA._safari=a[4]?parseFloat(a[4]):NaN;if(FB.UA._safari){a=/(?:Chrome\/(\d+\.\d+))/.exec(navigator.userAgent);FB.UA._chrome=a&&a[1]?parseFloat(a[1]):NaN;}else FB.UA._chrome=NaN;}else FB.UA._ie=FB.UA._firefox=FB.UA._opera=FB.UA._chrome=FB.UA._safari=NaN;if(c){FB.UA._osx=!!c[1];FB.UA._windows=!!c[2];FB.UA._linux=!!c[3];}else FB.UA._osx=FB.UA._windows=FB.UA._linux=false;FB.UA._ios=b;}});
FB.provide('XD',{_origin:null,_transport:null,_callbacks:{},_forever:{},_xdProxyUrl:'connect/xd_proxy.php',_openerTransport:null,_openerOrigin:null,_nonOpenerOrigin:null,init:function(b){if(FB.XD._origin)return;var d=(window.location.protocol+'//'+window.location.host+'/'+FB.guid());if(window.addEventListener&&!window.attachEvent&&window.postMessage){FB.XD._origin=d;FB.XD.PostMessage.init();FB.XD._transport='postmessage';}else if(!b&&FB.Flash.hasMinVersion()){if(document.getElementById('fb-root')){var c=document.domain;if(c=='facebook.com')c=window.location.host;FB.XD._origin=(window.location.protocol+'//'+c+'/'+FB.guid());FB.XD.Flash.init();FB.XD._transport='flash';}else{if(FB.log)FB.log('missing fb-root, defaulting to fragment-based xdcomm');FB.XD._transport='fragment';FB.XD.Fragment._channelUrl=b||window.location.toString();}}else{FB.XD._transport='fragment';FB.XD.Fragment._channelUrl=b||window.location.toString();}var a=!!window.attachEvent;if(FB.XD._transport!='postmessage'&&a&&window.postMessage){FB.XD._openerTransport=FB.XD._transport;FB.XD._openerOrigin=FB.XD._origin;FB.XD._nonOpenerOrigin=d;}},resolveRelation:function(b){var g,d,f=b.split('.'),e=window;for(var a=0,c=f.length;a<c;a++){g=f[a];if(g==='opener'||g==='parent'||g==='top'){e=e[g];}else if(d=/^frames\[['"]?([a-zA-Z0-9-_]+)['"]?\]$/.exec(g)){e=e.frames[d[1]];}else throw new SyntaxError('Malformed id to resolve: '+b+', pt: '+g);}return e;},handler:function(a,f,c,d,b){if(window.location.toString().indexOf(FB.XD.Fragment._magic)>0)return 'javascript:false;//';var g=FB.getDomain((b?'https_':'')+'cdn')+FB.XD._xdProxyUrl+'#';d=d||FB.guid();f=f||'opener';if(FB.XD._openerTransport)if(f=='opener'){FB.XD._transport=FB.XD._openerTransport;FB.XD._origin=FB.XD._openerOrigin;}else{FB.XD.PostMessage.init();FB.XD._transport='postmessage';FB.XD._origin=FB.XD._nonOpenerOrigin;}if(FB.XD._transport=='fragment'){g=FB.XD.Fragment._channelUrl;var e=g.indexOf('#');if(e>0)g=g.substr(0,e);g+=((g.indexOf('?')<0?'?':'&')+FB.XD.Fragment._magic+'#?=&');}if(c)FB.XD._forever[d]=true;FB.XD._callbacks[d]=a;return g+FB.QS.encode({cb:d,origin:FB.XD._origin,relation:f,transport:FB.XD._transport});},recv:function(b){if(typeof b=='string')try{b=FB.JSON.parse(b);}catch(c){b=FB.QS.decode(b);}var a=FB.XD._callbacks[b.cb];if(!FB.XD._forever[b.cb])delete FB.XD._callbacks[b.cb];a&&a(b);},PostMessage:{_isInitialized:false,init:function(){if(!FB.XD.PostMessage._isInitialized){var a=FB.XD.PostMessage.onMessage;window.addEventListener?window.addEventListener('message',a,false):window.attachEvent('onmessage',a);FB.XD.PostMessage._isInitialized=true;}},onMessage:function(event){FB.XD.recv(event.data);}},WebView:{onMessage:function(a,c,b){FB.XD.recv(b);}},Flash:{init:function(){FB.Flash.onReady(function(){document.XdComm.postMessage_init('FB.XD.Flash.onMessage',FB.XD._openerOrigin?FB.XD._openerOrigin:FB.XD._origin);});},onMessage:function(a){FB.XD.recv(decodeURIComponent(a));}},Fragment:{_magic:'fb_xd_fragment',checkAndDispatch:function(){var b=window.location.toString(),a=b.substr(b.indexOf('#')+1),c=b.indexOf(FB.XD.Fragment._magic);if(c>0){FB.init=FB.getLoginStatus=FB.api=function(){};document.documentElement.style.display='none';FB.XD.resolveRelation(FB.QS.decode(a).relation).FB.XD.recv(a);}}}});FB.XD.Fragment.checkAndDispatch();
FB.provide('Arbiter',{_canvasProxyUrl:'connect/canvas_proxy.php',inform:function(c,e,f,b){if(FB.Canvas.isTabIframe()||(!FB._inCanvas&&FB.UA.mobile()&&window.postMessage)){var d=FB.JSON.stringify({method:c,params:e});if(window.postMessage){FB.XD.resolveRelation(f||'parent').postMessage(d,'*');return;}else try{window.opener.postMessage(d);return;}catch(a){}}var h=(FB.getDomain((b?'https_':'')+'staticfb')+FB.Arbiter._canvasProxyUrl+'#'+FB.QS.encode({method:c,params:FB.JSON.stringify(e||{}),relation:f}));var g=FB.Content.appendHidden('');FB.Content.insertIframe({url:h,root:g,width:1,height:1,onload:function(){setTimeout(function(){g.parentNode.removeChild(g);},10);}});}});
FB.provide('Canvas',{_timer:null,_lastSize:{},_pageInfo:{clientWidth:0,clientHeight:0,scrollLeft:0,scrollTop:0,offsetLeft:0,offsetTop:0},_pageInfoPollInterval:200,init:function(){var d=FB.Dom.getViewportInfo();FB.Canvas._pageInfo.clientWidth=d.width;FB.Canvas._pageInfo.clientHeight=d.height;if(window.name){var c='top.frames['+window.name+']';var a=FB.XD.handler(function(e){if(e.type=='pageInfo.update'){FB.Canvas._pageInfo.clientWidth=e.clientWidth;FB.Canvas._pageInfo.clientHeight=e.clientHeight;FB.Canvas._pageInfo.scrollLeft=e.scrollLeft;FB.Canvas._pageInfo.scrollTop=e.scrollTop;FB.Canvas._pageInfo.offsetLeft=e.offsetLeft;FB.Canvas._pageInfo.offsetTop=e.offsetTop;FB.Event.fire('canvas.pageInfoChange',FB.Canvas._pageInfo);}},c,true);var b={channelUrl:a,frame:window.name,updateInterval:FB.Canvas._pageInfoPollInterval};FB.Arbiter.inform('pollPageInfo',b,'top');}},setSize:function(b){if(typeof b!="object")b={};b=FB.copy(b||{},FB.Canvas._computeContentSize());b=FB.copy(b,{frame:window.name||'iframe_canvas'});if(FB.Canvas._lastSize[b.frame]){var a=FB.Canvas._lastSize[b.frame].height;if(FB.Canvas._lastSize[b.frame].width==b.width&&(b.height<=a&&(Math.abs(a-b.height)<=16)))return false;}FB.Canvas._lastSize[b.frame]=b;FB.Arbiter.inform('setSize',b);return true;},scrollTo:function(a,b){FB.Arbiter.inform('scrollTo',{frame:window.name||'iframe_canvas',x:a,y:b});},setAutoResize:function(b,a){if(a===undefined&&typeof b=="number"){a=b;b=true;}if(b===undefined||b){if(FB.Canvas._timer===null)FB.Canvas._timer=window.setInterval(FB.Canvas.setSize,a||100);FB.Canvas.setSize();}else if(FB.Canvas._timer!==null){window.clearInterval(FB.Canvas._timer);FB.Canvas._timer=null;}},isTabIframe:function(){return (window.name.indexOf('app_runner_')===0);},getPageInfo:function(){return FB.Canvas._pageInfo;},setDoneLoading:function(a){FB.Canvas._passAppTtiMessage(a,'RecordIframeAppTti');},stopTimer:function(a){FB.Canvas._passAppTtiMessage(a,'StopIframeAppTtiTimer');},startTimer:function(){FB.Canvas._passAppTtiMessage(null,'StartIframeAppTtiTimer');},_passAppTtiMessage:function(a,c){var b=null;if(a)b=FB.XD.handler(a,'top.frames['+window.name+']',false);FB.Arbiter.inform(c,{frame:window.name||'iframe_canvas',time:(new Date()).getTime(),appId:parseInt(FB._apiKey,10),channelUrl:b});},_computeContentSize:function(){var a=document.body,c=document.documentElement,d=0,b=Math.max(Math.max(a.offsetHeight,a.scrollHeight)+a.offsetTop,Math.max(c.offsetHeight,c.scrollHeight)+c.offsetTop);if(a.offsetWidth<a.scrollWidth){d=a.scrollWidth+a.offsetLeft;}else FB.Array.forEach(a.childNodes,function(e){var f=e.offsetWidth+e.offsetLeft;if(f>d)d=f;});if(c.clientLeft>0)d+=(c.clientLeft*2);if(c.clientTop>0)b+=(c.clientTop*2);return {height:b,width:d};}});
FB.provide('Intl',{_punctCharClass:('['+'.!?'+'\u3002'+'\uFF01'+'\uFF1F'+'\u0964'+'\u2026'+'\u0EAF'+'\u1801'+'\u0E2F'+'\uFF0E'+']'),_endsInPunct:function(a){if(typeof a!='string')return false;return a.match(new RegExp(FB.Intl._punctCharClass+'['+')"'+"'"+'\u00BB'+'\u0F3B'+'\u0F3D'+'\u2019'+'\u201D'+'\u203A'+'\u3009'+'\u300B'+'\u300D'+'\u300F'+'\u3011'+'\u3015'+'\u3017'+'\u3019'+'\u301B'+'\u301E'+'\u301F'+'\uFD3F'+'\uFF07'+'\uFF09'+'\uFF3D'+'\s'+']*$'));},_tx:function(d,a){if(a!==undefined)if(typeof a!='object'){FB.log('The second arg to FB.Intl._tx() must be an Object for '+'tx('+d+', ...)');}else{var c;for(var b in a)if(a.hasOwnProperty(b)){if(FB.Intl._endsInPunct(a[b])){c=new RegExp('\{'+b+'\}'+FB.Intl._punctCharClass+'*','g');}else c=new RegExp('\{'+b+'\}','g');d=d.replace(c,a[b]);}}return d;},tx:function(b,a){function c(e,d){void(0);}if(!FB.Intl._stringTable)return null;return FBIntern.Intl._tx(FB.Intl._stringTable[b],a);}});
FB.provide('String',{trim:function(a){return a.replace(/^\s*|\s*$/g,'');},format:function(a){if(!FB.String.format._formatRE)FB.String.format._formatRE=/(\{[^\}^\{]+\})/g;var b=arguments;return a.replace(FB.String.format._formatRE,function(e,d){var c=parseInt(d.substr(1),10),f=b[c+1];if(f===null||f===undefined)return '';return f.toString();});},escapeHTML:function(b){var a=document.createElement('div');a.appendChild(document.createTextNode(b));return a.innerHTML.replace(/"/g,'&quot;').replace(/'/g,'&#39;');},quote:function(c){var a=/["\\\x00-\x1f\x7f-\x9f]/g,b={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};return a.test(c)?'"'+c.replace(a,function(d){var e=b[d];if(e)return e;e=d.charCodeAt();return '\\u00'+Math.floor(e/16).toString(16)+(e%16).toString(16);})+'"':'"'+c+'"';}});
FB.provide('Dom',{containsCss:function(c,a){var b=' '+c.className+' ';return b.indexOf(' '+a+' ')>=0;},addCss:function(b,a){if(!FB.Dom.containsCss(b,a))b.className=b.className+' '+a;},removeCss:function(b,a){if(FB.Dom.containsCss(b,a)){b.className=b.className.replace(a,'');FB.Dom.removeCss(b,a);}},getStyle:function(a,c){var d=false,b=a.style;if(a.currentStyle){FB.Array.forEach(c.match(/\-([a-z])/g),function(e){c=c.replace(e,e.substr(1,1).toUpperCase());});d=a.currentStyle[c];}else{FB.Array.forEach(c.match(/[A-Z]/g),function(e){c=c.replace(e,'-'+e.toLowerCase());});if(window.getComputedStyle){d=document.defaultView.getComputedStyle(a,null).getPropertyValue(c);if(c=='background-position-y'||c=='background-position-x')if(d=='top'||d=='left')d='0px';}}if(c=='opacity'){if(a.filters&&a.filters.alpha)return d;return d*100;}return d;},setStyle:function(a,c,d){var b=a.style;if(c=='opacity'){if(d>=100)d=99.999;if(d<0)d=0;b.opacity=d/100;b.MozOpacity=d/100;b.KhtmlOpacity=d/100;if(a.filters)if(a.filters.alpha==undefined){a.filter="alpha(opacity="+d+")";}else a.filters.alpha.opacity=d;}else b[c]=d;},addScript:function(b){var a=document.createElement('script');a.type="text/javascript";a.src=b;return document.getElementsByTagName('head')[0].appendChild(a);},addCssRules:function(e,c){if(!FB.Dom._cssRules)FB.Dom._cssRules={};var a=true;FB.Array.forEach(c,function(f){if(!(f in FB.Dom._cssRules)){a=false;FB.Dom._cssRules[f]=true;}});if(a)return;if(!FB.UA.ie()){var d=document.createElement('style');d.type='text/css';d.textContent=e;document.getElementsByTagName('head')[0].appendChild(d);}else try{document.createStyleSheet().cssText=e;}catch(b){if(document.styleSheets[0])document.styleSheets[0].cssText+=e;}},getViewportInfo:function(){var a=(document.documentElement&&document.compatMode=='CSS1Compat')?document.documentElement:document.body;return {scrollTop:a.scrollTop,scrollLeft:a.scrollLeft,width:self.innerWidth?self.innerWidth:a.clientWidth,height:self.innerHeight?self.innerHeight:a.clientHeight};},ready:function(a){if(FB.Dom._isReady){a&&a();}else FB.Event.subscribe('dom.ready',a);}});(function(){function domReady(){FB.Dom._isReady=true;FB.Event.fire('dom.ready');FB.Event.clear('dom.ready');}if(FB.Dom._isReady||document.readyState=='complete')return domReady();if(document.addEventListener){document.addEventListener('DOMContentLoaded',domReady,false);}else if(document.attachEvent)document.attachEvent('onreadystatechange',domReady);if(FB.UA.ie()&&window===top)(function(){try{document.documentElement.doScroll('left');}catch(error){setTimeout(arguments.callee,0);return;}domReady();})();var oldonload=window.onload;window.onload=function(){domReady();if(oldonload)if(typeof oldonload=='string'){eval(oldonload);}else oldonload();};})();
FB.provide('Dialog',{_loaderEl:null,_stack:[],_active:null,_findRoot:function(a){while(a){if(FB.Dom.containsCss(a,'fb_dialog'))return a;a=a.parentNode;}},_showLoader:function(a,c){if(!FB.Dialog._loaderEl){c=parseInt(c,10);c=c?c:460;FB.Dialog._loaderEl=FB.Dialog._findRoot(FB.Dialog.create({content:('<div class="dialog_title">'+'  <a id="fb_dialog_loader_close">'+'    <div class="fb_dialog_close_icon"></div>'+'  </a>'+'  <span>Facebook</span>'+'  <div style="clear:both;"></div>'+'</div>'+'<div class="dialog_content"></div>'+'<div class="dialog_footer"></div>'),width:c}));}if(!a)a=function(){};var b=FB.$('fb_dialog_loader_close');FB.Dom.removeCss(b,'fb_hidden');b.onclick=function(){FB.Dialog._hideLoader();a();};FB.Dialog._makeActive(FB.Dialog._loaderEl);},_hideLoader:function(){if(FB.Dialog._loaderEl&&FB.Dialog._loaderEl==FB.Dialog._active)FB.Dialog._loaderEl.style.top='-10000px';},_makeActive:function(a){FB.Dialog._lowerActive();FB.Dialog._active=a;FB.Dialog._centerActive(FB.Canvas.getPageInfo());},_lowerActive:function(){if(!FB.Dialog._active)return;FB.Dialog._active.style.top='-10000px';FB.Dialog._active=null;},_removeStacked:function(a){FB.Dialog._stack=FB.Array.filter(FB.Dialog._stack,function(b){return b!=a;});},_centerActive:function(f){var a=FB.Dialog._active;if(!a)return;var h=FB.Dom.getViewportInfo();var i=parseInt(a.offsetWidth,10);var b=parseInt(a.offsetHeight,10);var c=h.scrollLeft+(h.width-i)/2;var e=(h.height-b)/2.5;if(c<e)e=c;var d=h.height-b-e;var g=f.scrollTop-f.offsetTop+(f.clientHeight-b)/2;if(g<e){g=e;}else if(g>d)g=d;g+=h.scrollTop;a.style.left=(c>0?c:0)+'px';a.style.top=(g>0?g:0)+'px';},create:function(e){e=e||{};if(e.loader)FB.Dialog._showLoader(e.onClose,e.loaderWidth);var d=document.createElement('div'),c=document.createElement('div'),a='fb_dialog';if(e.closeIcon&&e.onClose){var b=document.createElement('a');b.className='fb_dialog_close_icon';b.onclick=e.onClose;d.appendChild(b);}if(FB.UA.ie()){a+=' fb_dialog_legacy';FB.Array.forEach(['vert_left','vert_right','horiz_top','horiz_bottom','top_left','top_right','bottom_left','bottom_right'],function(g){var h=document.createElement('span');h.className='fb_dialog_'+g;d.appendChild(h);});}else{a+=' fb_dialog_advanced';if(FB.UA.mobile())a+=' fb_mobile';}if(e.content)FB.Content.append(e.content,c);d.className=a;var f=parseInt(e.width,10);if(!isNaN(f))d.style.width=f+'px';c.className='fb_dialog_content';d.appendChild(c);FB.Content.append(d);if(e.visible)FB.Dialog.show(d);return c;},show:function(a){a=FB.Dialog._findRoot(a);if(a){FB.Dialog._removeStacked(a);FB.Dialog._hideLoader();FB.Dialog._makeActive(a);FB.Dialog._stack.push(a);}},hide:function(a){a=FB.Dialog._findRoot(a);if(a==FB.Dialog._active)FB.Dialog._lowerActive();},remove:function(a){a=FB.Dialog._findRoot(a);if(a){var b=FB.Dialog._active==a;FB.Dialog._removeStacked(a);FB.Dialog._hideLoader();if(b)if(FB.Dialog._stack.length>0){FB.Dialog.show(FB.Dialog._stack.pop());}else FB.Dialog._lowerActive();window.setTimeout(function(){a.parentNode.removeChild(a);},3000);}}});
FB.subclass('TemplateUI','Obj',function(a){this.method=a;this.cachedCall={url:FB.getDomain('staticfb')+'dialog/'+a+'?display=touch&in_iframe=1&preview_template=1&v='+FB.TemplateUI._version,frameName:FB.guid(),id:FB.guid(),size:FB.UIServer.getDefaultSize(),hideLoader:true};FB.XD.handler(this.bind(function(b){if(b.type=='getParams')this.setProperty('getParamsCb',b.returnCb);}),'parent',true,this.cachedCall.frameName);FB.UIServer.iframe(this.cachedCall);FB.Dialog.hide(this.cachedCall.root);},{use:function(a){a.root=this.cachedCall.root;FB.UIServer._active[a.id]=FB.UIServer._active[this.cachedCall.id];delete FB.UIServer._active[this.cachedCall.id];this.cachedCall.id=a.id;var b={};FB.copy(b,a.params);FB.copy(b,FB.TemplateData.getData()[this.method]);b.common=FB.TemplateData.getData().common;b.method=this.method;this.setParams(b);},setParams:function(a){this.monitor('getParamsCb',this.bind(function(){if(this.getParamsCb){frames[this.cachedCall.frameName].postMessage({params:a,cb:this.getParamsCb},'*');return true;}}));}});FB.provide('TemplateUI',{_timer:null,_cache:{},_version:0,init:function(){FB.TemplateData.init(FB.TemplateUI._version);FB.TemplateUI.initCache();},useCachedUI:function(b,a){FB.TemplateUI.populateCache();cache=FB.TemplateUI._cache[b];delete FB.TemplateUI._cache[b];cache.use(a);},populateCache:function(){if(!FB.TemplateData.enabled()||!FB.UA.mobile())return;clearInterval(FB.TemplateUI._timer);var b={feed:true,apprequests:true};for(var a in b)if(!(a in FB.TemplateUI._cache))FB.TemplateUI._cache[a]=new FB.TemplateUI(a);},initCache:function(){FB.TemplateUI._timer=setInterval(FB.TemplateUI.populateCache,2000);},supportsTemplate:function(b,a){return FB.TemplateData.enabled()&&FB.TemplateUI.paramsAllowTemplate(b,a.params)&&a.params.display==='touch'&&a.params.in_iframe&&FB.UA.mobile();},paramsAllowTemplate:function(c,a){var b={feed:{to:1,attachment:1,source:1},apprequests:{}};if(!(c in b))return false;for(var d in b[c])if(a[d])return false;if(c==='apprequests'&&FB.Frictionless&&FB.Frictionless._useFrictionless)return false;return true;}});
FB.provide('',{ui:function(f,b){if(!f.method){FB.log('"method" is a required parameter for FB.ui().');return;}if(f.method=='permissions.request'&&(f.display=='iframe'||f.display=='dialog')){var h=f.perms.split(',');for(var e=0;e<h.length;e++){var g=h[e].trim();if(!FB.initSitevars.iframePermissions[g.trim()]){f.display='popup';break;}}}var a=FB.UIServer.prepareCall(f,b);if(!a)return;var d=a.params.display;if(d=='dialog')d='iframe';var c=FB.UIServer[d];if(!c){FB.log('"display" must be one of "popup", "iframe" or "hidden".');return;}c(a);return a.id;}});FB.provide('UIServer',{Methods:{},_active:{},_defaultCb:{},_resultToken:'"xxRESULTTOKENxx"',_forceHTTPS:false,genericTransform:function(a){if(a.params.display=='dialog'||a.params.display=='iframe'){a.params.display='iframe';a.params.channel=FB.UIServer._xdChannelHandler(a.id,'parent.parent');}return a;},prepareCall:function(h,b){var g=h.method.toLowerCase(),f=FB.copy({},FB.UIServer.Methods[g]),e=FB.guid(),c=(f.noHttps!==true)&&(FB._https||(g!=='auth.status'));FB.UIServer._forceHTTPS=c;FB.copy(h,{api_key:FB._apiKey,app_id:FB._apiKey,locale:FB._locale,sdk:'joey',access_token:c&&FB._session&&FB._session.access_token||undefined});h.display=FB.UIServer.getDisplayMode(f,h);if(!f.url)f.url='dialog/'+g;var a={cb:b,id:e,size:f.size||FB.UIServer.getDefaultSize(),url:FB.getDomain(c?'https_www':'www')+f.url,forceHTTPS:c,params:h};var j=f.transform?f.transform:FB.UIServer.genericTransform;if(j){a=j(a);if(!a)return;}var d=f.getXdRelation||FB.UIServer.getXdRelation;var i=d(a.params.display);if(!(a.id in FB.UIServer._defaultCb)&&!('next' in a.params))a.params.next=FB.UIServer._xdResult(a.cb,a.id,i,true);if(i==='parent')a.params.channel_url=FB.UIServer._xdChannelHandler(e,'parent.parent');a=FB.UIServer.prepareParams(a);return a;},prepareParams:function(a){var c=a.params.method;if(!FB.Canvas.isTabIframe())delete a.params.method;if(FB.TemplateUI.supportsTemplate(c,a)){FB.TemplateUI.useCachedUI(c,a);}else{a.params=FB.JSON.flatten(a.params);var b=FB.QS.encode(a.params);if(FB.UIServer.urlTooLongForIE(a.url+b)){a.post=true;}else if(b)a.url+='?'+b;}return a;},urlTooLongForIE:function(a){return a.length>2000;},getDisplayMode:function(a,b){if(b.display==='hidden')return 'hidden';if(FB.Canvas.isTabIframe()&&b.display!=='popup')return 'async';if(FB.UA.mobile()||b.display==='touch')return 'touch';if(!FB._session&&b.display=='dialog'&&!a.loggedOutIframe){FB.log('"dialog" mode can only be used when the user is connected.');return 'popup';}if(a.connectDisplay&&!FB._inCanvas)return a.connectDisplay;return b.display||(FB._session?'dialog':'popup');},getXdRelation:function(a){if(a==='popup'||a==='touch')return 'opener';if(a==='dialog'||a==='iframe'||a==='hidden')return 'parent';if(a==='async')return 'parent.frames['+window.name+']';},popup:function(b){var a=typeof window.screenX!='undefined'?window.screenX:window.screenLeft,i=typeof window.screenY!='undefined'?window.screenY:window.screenTop,g=typeof window.outerWidth!='undefined'?window.outerWidth:document.documentElement.clientWidth,f=typeof window.outerHeight!='undefined'?window.outerHeight:(document.documentElement.clientHeight-22),k=b.size.width,d=b.size.height,h=(a<0)?window.screen.width+a:a,e=parseInt(h+((g-k)/2),10),j=parseInt(i+((f-d)/2.5),10),c=('width='+k+',height='+d+',left='+e+',top='+j+',scrollbars=1');if(b.params&&b.params.method=='permissions.request')c+=',location=1,toolbar=0';if(b.post){FB.UIServer._active[b.id]=window.open('about:blank',b.id,c);FB.Content.submitToTarget({url:b.url,target:b.id,params:b.params});}else FB.UIServer._active[b.id]=window.open(b.url,b.id,c);if(b.id in FB.UIServer._defaultCb)FB.UIServer._popupMonitor();},touch:function(a){if(FB.UA.nativeApp()){a.frame=a.id;if(FB.UA.ios()){FB.UIServer._active[a.id]=window.fbrpc&&fbrpc.open(a.url,a.id,'');}else{FB.UIServer._active[a.id]='webview';fbrpc.call('openWebView',FB.JSON.stringify({url:a.url,windowId:a.id}));}}else if(a.params.in_iframe){a.hideLoader=true;FB.UIServer.iframe(a);FB.Dialog.show(a.root);}else FB.UIServer.popup(a);},hidden:function(a){a.className='FB_UI_Hidden';a.root=FB.Content.appendHidden('');FB.UIServer._insertIframe(a);},iframe:function(a){if(a.root)return;a.className='FB_UI_Dialog';a.root=FB.Dialog.create({onClose:function(){FB.UIServer._triggerDefault(a.id);},loader:!a.hideLoader,loaderWidth:a.size.width,closeIcon:true});FB.Dom.addCss(a.root,'fb_dialog_iframe');var b=FB.Dialog._findRoot(a.root);FB.Dom.addCss(b,'loading');FB.UIServer._insertIframe(a);},async:function(a){a.frame=window.name;delete a.url;delete a.size;FB.Arbiter.inform('showDialog',a);},getDefaultSize:function(){if(FB.UA.mobile())return {width:window.innerWidth-6,height:window.innerHeight};return {width:575,height:240};},_insertIframe:function(b){FB.UIServer._active[b.id]=false;var a=function(c){if(b.id in FB.UIServer._active)FB.UIServer._active[b.id]=c;};if(b.post){FB.Content.insertIframe({url:'about:blank',root:b.root,className:b.className,width:b.size.width,height:b.size.height,onInsert:a,onload:function(c){FB.Content.submitToTarget({url:b.url,target:c.name,params:b.params});}});}else FB.Content.insertIframe({url:b.url,root:b.root,className:b.className,width:b.size.width,height:b.size.height,name:b.frameName,onInsert:a});},_triggerDefault:function(a){FB.UIServer._xdRecv({frame:a},FB.UIServer._defaultCb[a]||function(){});},_popupMonitor:function(){var a;for(var b in FB.UIServer._active)if(FB.UIServer._active.hasOwnProperty(b)&&b in FB.UIServer._defaultCb){var c=FB.UIServer._active[b];try{if(c.tagName)continue;}catch(d){}try{if(c.closed){FB.UIServer._triggerDefault(b);}else a=true;}catch(e){}}if(a&&!FB.UIServer._popupInterval){FB.UIServer._popupInterval=window.setInterval(FB.UIServer._popupMonitor,100);}else if(!a&&FB.UIServer._popupInterval){window.clearInterval(FB.UIServer._popupInterval);FB.UIServer._popupInterval=null;}},_xdChannelHandler:function(a,b){return FB.XD.handler(function(c){var d=FB.UIServer._active[a];if(!d)return;if(c.type=='resize'){if(c.height)d.style.height=c.height+'px';if(c.width)d.style.width=c.width+'px';if(c.ackData&&c.ackData.height)c.ackData.ackData={height:c.ackData.height};FB.Arbiter.inform('resize.ack',c.ackData||{},'parent.frames['+d.name+']',true);FB.Dialog.show(d);}else if(c.type=='hide'){FB.Dialog.hide(d);FB.Event.fire('dialog.hide');}else if(c.type=='rendered'){dialog=FB.Dialog._findRoot(d);FB.Dialog.show(dialog);FB.Dom.removeCss(dialog,'loading');FB.Event.fire('dialog.show');}else if(c.type=='fireevent')FB.Event.fire(c.event);},b,true,null,FB.UIServer._forceHTTPS);},_xdNextHandler:function(a,b,d,c){if(c)FB.UIServer._defaultCb[b]=a;return FB.XD.handler(function(e){FB.UIServer._xdRecv(e,a);},d)+'&frame='+b;},_xdRecv:function(b,a){var c=FB.UIServer._active[b.frame];try{if(FB.Dom.containsCss(c,'FB_UI_Hidden')){window.setTimeout(function(){c.parentNode.parentNode.removeChild(c.parentNode);},3000);}else if(FB.Dom.containsCss(c,'FB_UI_Dialog')){FB.Dialog.remove(c);if(FB.TemplateUI&&FB.UA.mobile())FB.TemplateUI.populateCache();}}catch(d){}try{if(c.close){c.close();FB.UIServer._popupCount--;}}catch(e){}if(c==='webview')fbrpc.call('closeWebView','{}');delete FB.UIServer._active[b.frame];delete FB.UIServer._defaultCb[b.frame];a(b);},_xdResult:function(a,b,d,c){return (FB.UIServer._xdNextHandler(function(e){a&&a(e.result&&e.result!=FB.UIServer._resultToken&&FB.JSON.parse(e.result));},b,d,c)+'&result='+encodeURIComponent(FB.UIServer._resultToken));}});
FB.provide('',{getLoginStatus:function(a,b){if(!FB._apiKey){FB.log('FB.getLoginStatus() called before calling FB.init().');return;}if(a)if(!b&&FB.Auth._loadState=='loaded'){a({status:FB._userStatus,session:FB._session});return;}else FB.Event.subscribe('FB.loginStatus',a);if(!b&&FB.Auth._loadState=='loading')return;FB.Auth._loadState='loading';var c=function(d){FB.Auth._loadState='loaded';FB.Event.fire('FB.loginStatus',d);FB.Event.clear('FB.loginStatus');};if(FB.UA.mobile()&&window.postMessage&&window.localStorage){FB.Auth.staticAuthCheck(c);}else FB.ui({method:'auth.status',display:'hidden'},c);},getSession:function(){return FB._session;},login:function(a,b){FB.ui(FB.copy({method:'permissions.request',display:'popup'},b||{}),a);},logout:function(a){FB.ui({method:'auth.logout',display:'hidden'},a);}});FB.provide('Auth',{_callbacks:[],_xdStorePath:'xd_localstorage/',staticAuthCheck:function(b){var a=FB.getDomain('https_staticfb');FB.Content.insertIframe({root:FB.Content.appendHidden(''),className:'FB_UI_Hidden',url:a+FB.Auth._xdStorePath,onload:function(f){var g=frames[f.name];var d=FB.guid();var e=false;var c=function(h){if(!e){e=true;FB.Auth._staticAuthHandler(b,h);}};FB.XD.handler(c,'parent',true,d);setTimeout(c,500);g.postMessage(FB.JSON.stringify({method:'getItem',params:['LoginInfo_'+FB._apiKey],returnCb:d}),a);}});},_staticAuthHandler:function(a,c){if(c&&c.data&&c.data.status){var b=FB.Auth.setSession(c.data.session||null,c.data.status);a&&a(b);}else FB.ui({method:'auth.status',display:'hidden'},a);},setSession:function(e,g){var b=!FB._session&&e,c=FB._session&&!e,a=FB._session&&e&&FB._session.uid!=e.uid,f=b||c||(FB._session&&e&&FB._session.access_token!=e.access_token),h=g!=FB._userStatus;var d={session:e,status:g};FB._session=e;FB._userStatus=g;if(f&&FB.Cookie&&FB.Cookie.getEnabled())FB.Cookie.set(e);if(h)FB.Event.fire('auth.statusChange',d);if(c||a)FB.Event.fire('auth.logout',d);if(b||a)FB.Event.fire('auth.login',d);if(f)FB.Event.fire('auth.sessionChange',d);if(FB.Auth._refreshTimer){window.clearTimeout(FB.Auth._refreshTimer);delete FB.Auth._refreshTimer;}if(FB.Auth._loadState&&e&&e.expires)FB.Auth._refreshTimer=window.setTimeout(function(){FB.getLoginStatus(null,true);},1200000);return d;},xdHandler:function(a,b,f,c,e,d){return FB.UIServer._xdNextHandler(FB.Auth.xdResponseWrapper(a,e,d),b,f,c);},xdResponseWrapper:function(a,c,b){return function(d){try{b=FB.JSON.parse(d.session);}catch(f){}if(b)c='connected';if(d&&d.fb_https&&!FB._https)FB._https=true;var e=FB.Auth.setSession(b||null,c);e.perms=d&&d.perms||null;a&&a(e);};}});FB.provide('UIServer.Methods',{'permissions.request':{size:{width:627,height:326},transform:function(a){if(!FB._apiKey){FB.log('FB.login() called before calling FB.init().');return;}if(FB._session&&!a.params.perms&&!a.params.auth_type){FB.log('FB.login() called when user is already connected.');a.cb&&a.cb({status:FB._userStatus,session:FB._session});return;}a=FB.UIServer.genericTransform(a);a.cb=FB.Auth.xdResponseWrapper(a.cb,FB._userStatus,FB._session);a.params.method='permissions.request';FB.copy(a.params,{fbconnect:FB._inCanvas?0:1,return_session:1,session_version:3});return a;}},'auth.logout':{url:'logout.php',transform:function(a){if(!FB._apiKey){FB.log('FB.logout() called before calling FB.init().');}else if(!FB._session){FB.log('FB.logout() called without a session.');}else{a.params.next=FB.Auth.xdHandler(a.cb,a.id,'parent',false,'unknown');return a;}}},'auth.status':{url:'extern/login_status.php',transform:function(a){var b=a.cb,c=a.id,e=FB.Auth.xdHandler;delete a.cb;var d=FB.UA.nativeApp()?3:(FB._inMobileCanvas?2:1);FB.copy(a.params,{no_session:e(b,c,'parent',false,'notConnected'),no_user:e(b,c,'parent',false,'unknown'),ok_session:e(b,c,'parent',false,'connected'),session_version:3,extern:FB._inCanvas?0:2,session_origin:d});return a;}}});
FB.provide('Cookie',{_domain:null,_enabled:false,setEnabled:function(a){FB.Cookie._enabled=a;},getEnabled:function(){return FB.Cookie._enabled;},load:function(){var a=document.cookie.match('\\bfbs_'+FB._apiKey+'="([^;]*)\\b'),b;if(a){b=FB.QS.decode(a[1]);b.expires=parseInt(b.expires,10);FB.Cookie._domain=b.base_domain;}return b;},setRaw:function(c,b,a){document.cookie='fbs_'+FB._apiKey+'="'+c+'"'+(c&&b==0?'':'; expires='+new Date(b*1000).toGMTString())+'; path=/'+(a?'; domain=.'+a:'');FB.Cookie._domain=a;},set:function(a){a?FB.Cookie.setRaw(FB.QS.encode(a),a.expires,a.base_domain):FB.Cookie.clear();},clear:function(){FB.Cookie.setRaw('',0,FB.Cookie._domain);}});
FB.provide('Frictionless',{_allowedRecipients:{},_useFrictionless:false,_updateRecipients:function(){FB.Frictionless._allowedRecipients={};FB.api('/me/apprequestformerrecipients',function(a){if(!a||a.error)return;FB.Array.forEach(a.data,function(b){FB.Frictionless._allowedRecipients[b.recipient_id]=true;},false);});},init:function(){FB.Frictionless._useFrictionless=true;FB.Event.subscribe('auth.login',function(a){if(a.session)FB.Frictionless._updateRecipients();});},_processRequestResponse:function(a){return function(d){var c=d&&typeof d.frictionless_value!=='undefined';var e=d&&d.updated_frictionless;if(FB.Frictionless._useFrictionless&&(e||c)){FB.Frictionless._updateRecipients();if(c){var b=[];FB.Array.forEach(d.request_ids,function(f){b.push(f);},false);d.request_ids=b;}}a&&a(d);};},isAllowed:function(c){if(!c)return false;if(typeof c==='number'||typeof c==='string')return FB.Frictionless._allowedRecipients[c];var a=true;var b=false;FB.Array.forEach(c,function(d){a=a&&FB.Frictionless._allowedRecipients[d];b=true;},false);return a&&b;}});
FB.provide('',{initSitevars:{},init:function(a){a=FB.copy(a||{},{logging:true,status:true});FB._apiKey=a.appId||a.apiKey;if(!a.logging&&window.location.toString().indexOf('fb_debug=1')<0)FB._logging=false;FB.XD.init(a.channelUrl);if(FB.UA.mobile()&&a.useCachedDialogs){FB.TemplateUI.init();FB.Event.subscribe('auth.sessionChange',FB.TemplateData.update);}if(a.frictionlessRequests)FB.Frictionless.init();if(FB._apiKey){FB.Cookie.setEnabled(a.cookie);a.session=a.session||FB.Cookie.load();FB.Auth.setSession(a.session,a.session?'connected':'unknown');if(a.status)FB.getLoginStatus();}if(FB._inCanvas)FB.Canvas.init();FB.Event.subscribe('xfbml.parse',function(){FB.XFBML.IframeWidget.batchWidgetPipeRequests();});if(a.xfbml)window.setTimeout(function(){if(FB.XFBML)if(FB.initSitevars.parseXFBMLBeforeDomReady){FB.XFBML.parse();var b=window.setInterval(function(){FB.XFBML.parse();},100);FB.Dom.ready(function(){window.clearInterval(b);FB.XFBML.parse();});}else FB.Dom.ready(FB.XFBML.parse);},0);if(FB.Canvas&&FB.Canvas.EarlyFlush)FB.Canvas.EarlyFlush._maybeSample();}});
FB.provide('Canvas.EarlyFlush',{_sampleRate:0,_appIdsBlacklist:[],_links:[],addResource:function(a){if(!FB._inCanvas||!FB._apiKey||!FB.Canvas.EarlyFlush._sampleRate)return;FB.Canvas.EarlyFlush._links.push(a);},_maybeSample:function(){if(!FB._inCanvas||!FB._apiKey||!FB.Canvas.EarlyFlush._sampleRate)return;var a=Math.random();if(a>1/FB.Canvas.EarlyFlush._sampleRate)return;if(FB.Canvas.EarlyFlush._appIdsBlacklist=='*')return;if(FB.Array.indexOf(FB.Canvas.EarlyFlush._appIdsBlacklist,parseInt(FB._apiKey,10))!=-1)return;window.setTimeout(FB.Canvas.EarlyFlush._sample,30000);},_sample:function(){var b={object:'data',link:'href',script:'src'};FB.Array.forEach(b,function(c,d){FB.Array.forEach(window.document.getElementsByTagName(d),function(e){if(e[c])FB.Canvas.EarlyFlush._links.push(e[c]);});});var a=FB.JSON.stringify(FB.Canvas.EarlyFlush._links);FB.api(FB._apiKey+'/staticresources','post',{urls:a});FB.Canvas.EarlyFlush._links=[];}});
FB.provide('CanvasInsights',{setDoneLoading:function(a){FB.Canvas.setDoneLoading(a);}});
FB.provide('UIServer.MobileIframableMethod',{transform:function(a){if(a.params.display==='touch'&&!FB.UA.nativeApp()&&a.params.access_token&&window.postMessage){a.params.channel=FB.UIServer._xdChannelHandler(a.id,'parent');a.params.in_iframe=1;return a;}else return FB.UIServer.genericTransform(a);},getXdRelation:function(a){if(a==='touch'&&!FB.UA.nativeApp()&&window.postMessage)return 'parent';return FB.UIServer.getXdRelation(a);}});FB.provide('UIServer.Methods',{'stream.share':{size:{width:575,height:380},url:'sharer.php',transform:function(a){if(!a.params.u)a.params.u=window.location.toString();return a;}},'fbml.dialog':{size:{width:575,height:300},url:'render_fbml.php',loggedOutIframe:true,transform:function(a){return a;}},'auth.logintofacebook':{size:{width:530,height:287},url:'login.php',transform:function(a){a.params.skip_api_login=1;var c=FB.UIServer.getXdRelation(a.params.display);var b=FB.UIServer._xdResult(a.cb,a.id,c,true);a.params.next=FB.getDomain(FB._https?'https_www':'www')+"login.php?"+FB.QS.encode({api_key:FB._apiKey,next:b,skip_api_login:1});return a;}},apprequests:{transform:function(a){a=FB.UIServer.MobileIframableMethod.transform(a);if(FB.Frictionless&&FB.Frictionless._useFrictionless){a.cb=FB.Frictionless._processRequestResponse(a.cb);a.hideLoader=FB.Frictionless.isAllowed(a.params.to);}return a;},getXdRelation:function(a){return FB.UIServer.MobileIframableMethod.getXdRelation(a);}},feed:FB.UIServer.MobileIframableMethod});
FB.provide('',{share:function(a){FB.log('FB.share() has been deprecated. Please use FB.ui() instead.');FB.ui({display:'popup',method:'stream.share',u:a});},publish:function(b,a){FB.log('FB.publish() has been deprecated. Please use FB.ui() instead.');b=b||{};FB.ui(FB.copy({display:'popup',method:'stream.publish',preview:1},b||{}),a);},addFriend:function(b,a){FB.log('FB.addFriend() has been deprecated. Please use FB.ui() instead.');FB.ui({display:'popup',id:b,method:'friend.add'},a);}});FB.UIServer.Methods['auth.login']=FB.UIServer.Methods['permissions.request'];
FB.provide('XFBML',{_renderTimeout:30000,parse:function(d,b){d=d||document.body;var c=1,e=function(){c--;if(c===0){b&&b();FB.Event.fire('xfbml.render');}};var a={};if(FB.XFBML._widgetPipeIsEnabled())FB.Array.forEach(FB.XFBML._tagInfos,function(f){if(f.supportsWidgetPipe){var h=f.xmlns?f.xmlns:'fb';var g=FB.XFBML._getDomElements(d,h,f.localName);a[f.localName]=g;FB.XFBML._widgetPipeEnabledTagCount+=g.length;}});FB.Array.forEach(FB.XFBML._tagInfos,function(g){if(!g.xmlns)g.xmlns='fb';var h;if(a[g.localName]!==undefined){h=a[g.localName];}else h=FB.XFBML._getDomElements(d,g.xmlns,g.localName);for(var f=0;f<h.length;f++){c++;FB.XFBML._processElement(h[f],g,e);}});FB.Event.fire('xfbml.parse');window.setTimeout(function(){if(c>0)FB.log(c+' XFBML tags failed to render in '+FB.XFBML._renderTimeout+'ms.');},FB.XFBML._renderTimeout);e();},registerTag:function(a){FB.XFBML._tagInfos.push(a);},shouldUseWidgetPipe:function(){if(!FB.XFBML._widgetPipeIsEnabled())return false;var a=FB.XFBML._widgetPipeEnabledTagCount>1;return a;},_processElement:function(dom,tagInfo,cb){var element=dom._element;if(element){element.subscribe('render',cb);element.process();}else{var processor=function(){var fn=eval(tagInfo.className);var getBoolAttr=function(attr){var attr=dom.getAttribute(attr);return (attr&&FB.Array.indexOf(['true','1','yes','on'],attr.toLowerCase())>-1);};var isLogin=false;var showFaces=true;var renderInIframe=false;if(tagInfo.className==='FB.XFBML.LoginButton'){renderInIframe=getBoolAttr('render-in-iframe');showFaces=getBoolAttr('show-faces')||getBoolAttr('show_faces');isLogin=renderInIframe||showFaces||getBoolAttr('oneclick');if(isLogin)fn=FB.XFBML.Login;}element=dom._element=new fn(dom);if(isLogin){var extraParams={show_faces:showFaces};var perms=dom.getAttribute('perms');if(perms)extraParams.perms=perms;element.setExtraParams(extraParams);}element.subscribe('render',cb);element.process();};if(FB.CLASSES[tagInfo.className.substr(3)]){processor();}else FB.log('Tag '+tagInfo.className+' was not found.');}},_getDomElements:function(a,e,d){var c=e+':'+d;if(FB.UA.firefox()){return a.getElementsByTagNameNS(document.body.namespaceURI,c);}else if(FB.UA.ie()<9){try{var docNamespaces=document.namespaces;if(docNamespaces&&docNamespaces[e]){var nodes=a.getElementsByTagName(d);if(!document.addEventListener||nodes.length>0)return nodes;}}catch(b){}return a.getElementsByTagName(c);}else return a.getElementsByTagName(c);},_tagInfos:[{localName:'activity',className:'FB.XFBML.Activity'},{localName:'add-profile-tab',className:'FB.XFBML.AddProfileTab'},{localName:'bookmark',className:'FB.XFBML.Bookmark'},{localName:'comments',className:'FB.XFBML.Comments'},{localName:'comments-count',className:'FB.XFBML.CommentsCount'},{localName:'connect-bar',className:'FB.XFBML.ConnectBar'},{localName:'fan',className:'FB.XFBML.Fan'},{localName:'like',className:'FB.XFBML.Like',supportsWidgetPipe:true},{localName:'like-box',className:'FB.XFBML.LikeBox'},{localName:'live-stream',className:'FB.XFBML.LiveStream'},{localName:'login',className:'FB.XFBML.Login'},{localName:'login-button',className:'FB.XFBML.LoginButton'},{localName:'facepile',className:'FB.XFBML.Facepile'},{localName:'friendpile',className:'FB.XFBML.Friendpile'},{localName:'name',className:'FB.XFBML.Name'},{localName:'profile-pic',className:'FB.XFBML.ProfilePic'},{localName:'recommendations',className:'FB.XFBML.Recommendations'},{localName:'registration',className:'FB.XFBML.Registration'},{localName:'send',className:'FB.XFBML.Send'},{localName:'serverfbml',className:'FB.XFBML.ServerFbml'},{localName:'share-button',className:'FB.XFBML.ShareButton'},{localName:'social-bar',className:'FB.XFBML.SocialBar'}],_widgetPipeEnabledTagCount:0,_widgetPipeIsEnabled:function(){return FB.widgetPipeEnabledApps&&FB.widgetPipeEnabledApps[FB._apiKey]!==undefined;}});(function(){try{if(document.namespaces&&!document.namespaces.item.fb)document.namespaces.add('fb');}catch(a){}}());
FB.provide('XFBML',{set:function(b,c,a){FB.log('FB.XFBML.set() has been deprecated.');b.innerHTML=c;FB.XFBML.parse(b,a);}});
FB.subclass('Waitable','Obj',function(){},{set:function(a){this.setProperty('value',a);},error:function(a){this.fire("error",a);},wait:function(a,b){if(b)this.subscribe('error',b);this.monitor('value',this.bind(function(){if(this.value!==undefined){a(this.value);return true;}}));}});
FB.subclass('Data.Query','Waitable',function(){if(!FB.Data.Query._c)FB.Data.Query._c=1;this.name='v_'+FB.Data.Query._c++;},{parse:function(a){var b=FB.String.format.apply(null,a),d=(/^select (.*?) from (\w+)\s+where (.*)$/i).exec(b);this.fields=this._toFields(d[1]);this.table=d[2];this.where=this._parseWhere(d[3]);for(var c=1;c<a.length;c++)if(FB.Type.isType(a[c],FB.Data.Query))a[c].hasDependency=true;return this;},toFql:function(){var a='select '+this.fields.join(',')+' from '+this.table+' where ';switch(this.where.type){case 'unknown':a+=this.where.value;break;case 'index':a+=this.where.key+'='+this._encode(this.where.value);break;case 'in':if(this.where.value.length==1){a+=this.where.key+'='+this._encode(this.where.value[0]);}else a+=this.where.key+' in ('+FB.Array.map(this.where.value,this._encode).join(',')+')';break;}return a;},_encode:function(a){return typeof(a)=='string'?FB.String.quote(a):a;},toString:function(){return '#'+this.name;},_toFields:function(a){return FB.Array.map(a.split(','),FB.String.trim);},_parseWhere:function(s){var re=(/^\s*(\w+)\s*=\s*(.*)\s*$/i).exec(s),result,value,type='unknown';if(re){value=re[2];if(/^(["'])(?:\\?.)*?\1$/.test(value)){value=eval(value);type='index';}else if(/^\d+\.?\d*$/.test(value))type='index';}if(type=='index'){result={type:'index',key:re[1],value:value};}else result={type:'unknown',value:s};return result;}});
FB.provide('Data',{query:function(c,a){var b=new FB.Data.Query().parse(arguments);FB.Data.queue.push(b);FB.Data._waitToProcess();return b;},waitOn:function(dependencies,callback){var result=new FB.Waitable(),count=dependencies.length;if(typeof(callback)=='string'){var s=callback;callback=function(args){return eval(s);};}FB.Array.forEach(dependencies,function(item){item.monitor('value',function(){var done=false;if(FB.Data._getValue(item)!==undefined){count--;done=true;}if(count===0){var value=callback(FB.Array.map(dependencies,FB.Data._getValue));result.set(value!==undefined?value:true);}return done;});});return result;},_getValue:function(a){return FB.Type.isType(a,FB.Waitable)?a.value:a;},_selectByIndex:function(a,d,b,e){var c=new FB.Data.Query();c.fields=a;c.table=d;c.where={type:'index',key:b,value:e};FB.Data.queue.push(c);FB.Data._waitToProcess();return c;},_waitToProcess:function(){if(FB.Data.timer<0)FB.Data.timer=setTimeout(FB.Data._process,10);},_process:function(){FB.Data.timer=-1;var c={},e=FB.Data.queue;FB.Data.queue=[];for(var a=0;a<e.length;a++){var b=e[a];if(b.where.type=='index'&&!b.hasDependency){FB.Data._mergeIndexQuery(b,c);}else c[b.name]=b;}var d={method:'fql.multiquery',queries:{}};FB.copy(d.queries,c,true,function(f){return f.toFql();});d.queries=FB.JSON.stringify(d.queries);FB.api(d,function(f){if(f.error_msg){FB.Array.forEach(c,function(g){g.error(Error(f.error_msg));});}else FB.Array.forEach(f,function(g){c[g.name].set(g.fql_result_set);});});},_mergeIndexQuery:function(a,d){var b=a.where.key,f=a.where.value;var e='index_'+a.table+'_'+b;var c=d[e];if(!c){c=d[e]=new FB.Data.Query();c.fields=[b];c.table=a.table;c.where={type:'in',key:b,value:[]};}FB.Array.merge(c.fields,a.fields);FB.Array.merge(c.where.value,[f]);c.wait(function(g){a.set(FB.Array.filter(g,function(h){return h[b]==f;}));});},timer:-1,queue:[]});
window.setTimeout(function(){var a=/(connect.facebook.net|facebook.com\/assets.php).*?#(.*)/;FB.Array.forEach(document.getElementsByTagName('script'),function(d){if(d.src){var b=a.exec(d.src);if(b){var c=FB.QS.decode(b[2]);FB.Array.forEach(c,function(f,e){if(f=='0')c[e]=0;});FB.init(c);}}});if(window.fbAsyncInit&&!window.fbAsyncInit.hasRun){window.fbAsyncInit.hasRun=true;fbAsyncInit();}},0);
FB.provide('UIServer.Methods',{'pay.prompt':{transform:function(a){var b=FB.XD.handler(function(c){a.cb(FB.JSON.parse(c.response));},'parent.frames['+(window.name||'iframe_canvas')+']');a.params.channel=b;FB.Arbiter.inform('Pay.Prompt',a.params);return false;}}});FB.provide('UIServer.Methods',{pay:{size:{width:555,height:120},noHttps:true,connectDisplay:'popup',transform:function(a){if(!FB._inCanvas){a.params.order_info=FB.JSON.stringify(a.params.order_info);return a;}var b=FB.XD.handler(function(c){a.cb(FB.JSON.parse(c.response));},'parent.frames['+(window.name||'iframe_canvas')+']');a.params.channel=b;a.params.uiserver=true;FB.Arbiter.inform('Pay.Prompt',a.params);return false;}}});
FB.Class('XFBML.Element',function(a){this.dom=a;},FB.copy({getAttribute:function(b,a,c){var d=(this.dom.getAttribute(b)||this.dom.getAttribute(b.replace(/-/g,'_'))||this.dom.getAttribute(b.replace(/-/g,'')));return d?(c?c(d):d):a;},_getBoolAttribute:function(b,a){return this.getAttribute(b,a,function(c){c=c.toLowerCase();return c=='true'||c=='1'||c=='yes'||c=='on';});},_getPxAttribute:function(b,a){return this.getAttribute(b,a,function(c){var d=parseInt(c.replace('px',''),10);if(isNaN(d)){return a;}else return d;});},_getAttributeFromList:function(c,b,a){return this.getAttribute(c,b,function(d){d=d.toLowerCase();if(FB.Array.indexOf(a,d)>-1){return d;}else return b;});},isValid:function(){for(var a=this.dom;a;a=a.parentNode)if(a==document.body)return true;},clear:function(){this.dom.innerHTML='';}},FB.EventProvider));
FB.subclass('XFBML.IframeWidget','XFBML.Element',null,{_iframeName:null,_showLoader:true,_refreshOnAuthChange:false,_allowReProcess:false,_fetchPreCachedLoader:false,_visibleAfter:'load',_widgetPipeEnabled:false,getUrlBits:function(){throw new Error('Inheriting class needs to implement getUrlBits().');},setupAndValidate:function(){return true;},oneTimeSetup:function(){},getSize:function(){},getIframeName:function(){if(!this._iframeName&&this._widgetPipeEnabled&&FB.XFBML.shouldUseWidgetPipe()){this._iframeName=this.generateWidgetPipeIframeName();FB.XFBML.IframeWidget.allWidgetPipeIframes[this._iframeName]=this;if(FB.XFBML.IframeWidget.masterWidgetPipeIframe===null)FB.XFBML.IframeWidget.masterWidgetPipeIframe=this;}return this._iframeName;},getIframeTitle:function(){},getChannelUrl:function(){if(!this._channelUrl){var a=this;this._channelUrl=FB.XD.handler(function(b){a.fire('xd.'+b.type,b);},'parent.parent',true);}return this._channelUrl;},getIframeNode:function(){return this.dom.getElementsByTagName('iframe')[0];},process:function(a){if(this._done){if(!this._allowReProcess&&!a)return;this.clear();}else this._oneTimeSetup();this._done=true;if(!this.setupAndValidate()){this.fire('render');return;}if(this._showLoader)this._addLoader();FB.Dom.addCss(this.dom,'fb_iframe_widget');if(this._visibleAfter!='immediate'){FB.Dom.addCss(this.dom,'fb_hide_iframes');}else this.subscribe('iframe.onload',FB.bind(this.fire,this,'render'));var b=this.getSize()||{};var c=this.getFullyQualifiedURL();FB.Content.insertIframe({url:c,root:this.dom.appendChild(document.createElement('span')),name:this.getIframeName(),title:this.getIframeTitle(),className:FB._localeIsRtl?'fb_rtl':'fb_ltr',height:b.height,width:b.width,onload:FB.bind(this.fire,this,'iframe.onload')});},generateWidgetPipeIframeName:function(){FB.XFBML.IframeWidget.widgetPipeIframeCount++;return 'fb_iframe_'+FB.XFBML.IframeWidget.widgetPipeIframeCount;},getFullyQualifiedURL:function(){if(FB.XFBML.shouldUseWidgetPipe()&&this._widgetPipeEnabled)return this._getWidgetPipeShell();var b=this._getURL();if(!this._fetchPreCachedLoader)b+='?'+FB.QS.encode(this._getQS());if(b.length>2000){b='about:blank';var a=FB.bind(function(){this._postRequest();this.unsubscribe('iframe.onload',a);},this);this.subscribe('iframe.onload',a);}return b;},_getWidgetPipeShell:function(){return FB.getDomain('www')+'common/widget_pipe_shell.php';},_oneTimeSetup:function(){this.subscribe('xd.resize',FB.bind(this._handleResizeMsg,this));if(FB.getLoginStatus){this.subscribe('xd.refreshLoginStatus',FB.bind(FB.getLoginStatus,FB,function(){},true));this.subscribe('xd.logout',FB.bind(FB.logout,FB,function(){}));}if(this._refreshOnAuthChange)this._setupAuthRefresh();if(this._visibleAfter=='load')this.subscribe('iframe.onload',FB.bind(this._makeVisible,this));this.oneTimeSetup();},_makeVisible:function(){this._removeLoader();FB.Dom.removeCss(this.dom,'fb_hide_iframes');this.fire('render');},_setupAuthRefresh:function(){FB.getLoginStatus(FB.bind(function(b){var a=b.status;FB.Event.subscribe('auth.statusChange',FB.bind(function(c){if(!this.isValid())return;if(a=='unknown'||c.status=='unknown')this.process(true);a=c.status;},this));},this));},_handleResizeMsg:function(b){if(!this.isValid())return;var a=this.getIframeNode();a.style.height=b.height+'px';if(b.width)a.style.width=b.width+'px';a.style.border='none';this._makeVisible();},_addLoader:function(){if(!this._loaderDiv){FB.Dom.addCss(this.dom,'fb_iframe_widget_loader');this._loaderDiv=document.createElement('div');this._loaderDiv.className='FB_Loader';this.dom.appendChild(this._loaderDiv);}},_removeLoader:function(){if(this._loaderDiv){FB.Dom.removeCss(this.dom,'fb_iframe_widget_loader');if(this._loaderDiv.parentNode)this._loaderDiv.parentNode.removeChild(this._loaderDiv);this._loaderDiv=null;}},_getQS:function(){return FB.copy({api_key:FB._apiKey,locale:FB._locale,sdk:'joey',session_key:FB._session&&FB._session.session_key,ref:this.getAttribute('ref')},this.getUrlBits().params);},_getURL:function(){var a='www',b='';if(this._fetchPreCachedLoader){a='cdn';b='static/';}return FB.getDomain(a)+'plugins/'+b+this.getUrlBits().name+'.php';},_postRequest:function(){FB.Content.submitToTarget({url:this._getURL(),target:this.getIframeNode().name,params:this._getQS()});}});FB.provide('XFBML.IframeWidget',{widgetPipeIframeCount:0,masterWidgetPipeIframe:null,allWidgetPipeIframes:{},batchWidgetPipeRequests:function(){if(!FB.XFBML.IframeWidget.masterWidgetPipeIframe)return;var a=FB.XFBML.IframeWidget._groupWidgetPipeDescriptions();var c={widget_pipe:FB.JSON.stringify(a),href:window.location,site:location.hostname,channel:FB.XFBML.IframeWidget.masterWidgetPipeIframe.getChannelUrl(),api_key:FB._apiKey,locale:FB._locale,sdk:'joey',session_key:FB._session&&FB._session.session_key};var b=FB.guid();FB.Content.insertIframe({url:'about:blank',root:document.getElementById('fb-root')||document.body,name:b,className:'fb_hidden',onload:function(){FB.Content.submitToTarget({url:FB._domain.www+'widget_pipe.php',target:b,params:c},true);}});},_groupWidgetPipeDescriptions:function(){var e={};for(var b in FB.XFBML.IframeWidget.allWidgetPipeIframes){var a=FB.XFBML.IframeWidget.allWidgetPipeIframes[b];var c=a.getUrlBits();var d={widget:c.name};FB.copy(d,c.params);e[b]=d;}return e;}});
FB.subclass('XFBML.Activity','XFBML.IframeWidget',null,{_visibleAfter:'load',_refreshOnAuthChange:true,setupAndValidate:function(){this._attr={border_color:this.getAttribute('border-color'),colorscheme:this.getAttribute('color-scheme'),filter:this.getAttribute('filter'),action:this.getAttribute('action'),font:this.getAttribute('font'),header:this._getBoolAttribute('header'),height:this._getPxAttribute('height',300),recommendations:this._getBoolAttribute('recommendations'),site:this.getAttribute('site',location.hostname),width:this._getPxAttribute('width',300)};return true;},getSize:function(){return {width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return {name:'activity',params:this._attr};}});
FB.subclass('XFBML.ButtonElement','XFBML.Element',null,{_allowedSizes:['icon','small','medium','large','xlarge'],onClick:function(){throw new Error('Inheriting class needs to implement onClick().');},setupAndValidate:function(){return true;},getButtonMarkup:function(){return this.getOriginalHTML();},getOriginalHTML:function(){return this._originalHTML;},process:function(){if(!('_originalHTML' in this))this._originalHTML=FB.String.trim(this.dom.innerHTML);if(!this.setupAndValidate()){this.fire('render');return;}var d=this._getAttributeFromList('size','medium',this._allowedSizes),a='',b='';if(d=='icon'){a='fb_button_simple';}else{var c=FB._localeIsRtl?'_rtl':'';b=this.getButtonMarkup();a='fb_button'+c+' fb_button_'+d+c;}this.dom.innerHTML=('<a class="'+a+'">'+'<span class="fb_button_text">'+b+'</span>'+'</a>');this.dom.firstChild.onclick=FB.bind(this.onClick,this);this.fire('render');}});
FB.subclass('XFBML.AddProfileTab','XFBML.ButtonElement',null,{getButtonMarkup:function(){return FB.Intl._tx("Dodaj zak\u0142adk\u0119 Profilu na Facebooku ");},onClick:function(){FB.ui({method:'profile.addtab'},this.bind(function(a){if(a.tab_added)FB.Helper.invokeHandler(this.getAttribute('on-add'),this);}));}});
FB.subclass('XFBML.Bookmark','XFBML.ButtonElement',null,{getButtonMarkup:function(){return FB.Intl._tx("Zak\u0142adka na Facebooku");},onClick:function(){FB.ui({method:'bookmark.add'},this.bind(function(a){if(a.bookmarked)FB.Helper.invokeHandler(this.getAttribute('on-add'),this);}));}});
FB.subclass('XFBML.Comments','XFBML.IframeWidget',null,{_visibleAfter:'immediate',_refreshOnAuthChange:true,setupAndValidate:function(){var a={channel_url:this.getChannelUrl(),colorscheme:this.getAttribute('colorscheme'),numposts:this.getAttribute('num-posts',10),width:this._getPxAttribute('width',550),href:this.getAttribute('href'),permalink:this.getAttribute('permalink'),publish_feed:this.getAttribute('publish_feed')};if(!a.href){a.migrated=this.getAttribute('migrated');a.xid=this.getAttribute('xid');a.title=this.getAttribute('title',document.title);a.url=this.getAttribute('url',document.URL);a.quiet=this.getAttribute('quiet');a.reverse=this.getAttribute('reverse');a.simple=this.getAttribute('simple');a.css=this.getAttribute('css');a.notify=this.getAttribute('notify');if(!a.xid){var c=document.URL.indexOf('#');if(c>0){a.xid=encodeURIComponent(document.URL.substring(0,c));}else a.xid=encodeURIComponent(document.URL);}if(a.migrated)a.href='http://www.facebook.com/plugins/comments_v1.php?'+'app_id='+FB._apiKey+'&xid='+encodeURIComponent(a.xid)+'&url='+encodeURIComponent(a.url);}else{var b=this.getAttribute('fb_comment_id');if(!b){b=FB.QS.decode(document.URL.substring(document.URL.indexOf('?')+1)).fb_comment_id;if(b&&b.indexOf('#')>0)b=b.substring(0,b.indexOf('#'));}if(b){a.fb_comment_id=b;this.subscribe('render',FB.bind(function(){window.location.hash=this.getIframeNode().id;},this));}}this._attr=a;return true;},oneTimeSetup:function(){this.subscribe('xd.addComment',FB.bind(this._handleCommentMsg,this));this.subscribe('xd.commentCreated',FB.bind(this._handleCommentCreatedMsg,this));this.subscribe('xd.commentRemoved',FB.bind(this._handleCommentRemovedMsg,this));},getSize:function(){return {width:this._attr.width,height:200};},getUrlBits:function(){return {name:'comments',params:this._attr};},_handleCommentMsg:function(a){if(!this.isValid())return;FB.Event.fire('comments.add',{post:a.post,user:a.user,widget:this});},_handleCommentCreatedMsg:function(b){if(!this.isValid())return;var a={href:b.href,commentID:b.commentID,parentCommentID:b.parentCommentID};FB.Event.fire('comment.create',a);},_handleCommentRemovedMsg:function(b){if(!this.isValid())return;var a={href:b.href,commentID:b.commentID};FB.Event.fire('comment.remove',a);}});
FB.subclass('XFBML.CommentsCount','XFBML.Element',null,{process:function(){this._href=this.getAttribute('href',window.location.href);this._count=FB.Data._selectByIndex(['commentsbox_count'],'link_stat','url',this._href);FB.Dom.addCss(this.dom,'fb_comments_count_zero');this._count.wait(FB.bind(function(){var a=this._count.value[0].commentsbox_count;this.dom.innerHTML=FB.String.format('<span class="fb_comments_count">{0}</span>',a);if(a>0)FB.Dom.removeCss(this.dom,'fb_comments_count_zero');this.fire('render');},this));}});
FB.provide('Anim',{ate:function(c,g,d,b){d=!isNaN(parseFloat(d))&&d>=0?d:750;var e=40,f={},j={},a=null,h=c.style,i=setInterval(FB.bind(function(){if(!a)a=new Date().getTime();var k=1;if(d!=0)k=Math.min((new Date().getTime()-a)/d,1);FB.Array.forEach(g,FB.bind(function(o,m){if(!f[m]){var n=FB.Dom.getStyle(c,m);if(n===false)return;f[m]=this._parseCSS(n+'');}if(!j[m])j[m]=this._parseCSS(o.toString());var l='';FB.Array.forEach(f[m],function(q,p){if(isNaN(j[m][p].numPart)&&j[m][p].textPart=='?'){l=q.numPart+q.textPart;}else if(isNaN(q.numPart)){l=q.textPart;}else l+=(q.numPart+Math.ceil((j[m][p].numPart-q.numPart)*Math.sin(Math.PI/2*k)))+j[m][p].textPart+' ';});FB.Dom.setStyle(c,m,l);},this));if(k==1){clearInterval(i);if(b)b(c);}},this),e);},_parseCSS:function(a){var b=[];FB.Array.forEach(a.split(' '),function(d){var c=parseInt(d,10);b.push({numPart:c,textPart:d.replace(c,'')});});return b;}});
FB.provide('Insights',{impression:function(e,a){var b=FB.guid(),g="//ah8.facebook.com/impression.php/"+b+"/",c=new Image(1,1),f=[];if(!e.api_key&&FB._apiKey)e.api_key=FB._apiKey;for(var d in e)f.push(encodeURIComponent(d)+'='+encodeURIComponent(e[d]));g+='?'+f.join('&');if(a)c.onload=a;c.src=g;}});
FB.subclass('XFBML.ConnectBar','XFBML.Element',null,{_initialHeight:null,_initTopMargin:0,_picFieldName:'pic_square',_page:null,_displayed:false,_notDisplayed:false,_container:null,_animationSpeed:0,process:function(){FB.getLoginStatus(this.bind(function(a){FB.Event.monitor('auth.statusChange',this.bind(function(){if(this.isValid()&&FB._userStatus=='connected'){this._uid=FB.Helper.getLoggedInUser();FB.api({method:'Connect.shouldShowConnectBar'},this.bind(function(b){if(b!=2){this._animationSpeed=(b==0)?750:0;this._showBar();}else this._noRender();}));}else this._noRender();return false;}));}));},_showBar:function(){var a=FB.Data._selectByIndex(['first_name','profile_url',this._picFieldName],'user','uid',this._uid);var b=FB.Data._selectByIndex(['display_name'],'application','api_key',FB._apiKey);FB.Data.waitOn([a,b],FB.bind(function(c){c[0][0].site_name=c[1][0].display_name;if(!this._displayed){this._displayed=true;this._notDisplayed=false;this._renderConnectBar(c[0][0]);this.fire('render');FB.Insights.impression({lid:104,name:'widget_load'});this.fire('connectbar.ondisplay');FB.Event.fire('connectbar.ondisplay',this);FB.Helper.invokeHandler(this.getAttribute('on-display'),this);}},this));},_noRender:function(){if(this._displayed){this._displayed=false;this._closeConnectBar();}if(!this._notDisplayed){this._notDisplayed=true;this.fire('render');this.fire('connectbar.onnotdisplay');FB.Event.fire('connectbar.onnotdisplay',this);FB.Helper.invokeHandler(this.getAttribute('on-not-display'),this);}},_renderConnectBar:function(d){var b=document.createElement('div'),c=document.createElement('div');b.className='fb_connect_bar';c.className='fb_reset fb_connect_bar_container';c.appendChild(b);document.body.appendChild(c);this._container=c;this._initialHeight=Math.round(parseFloat(FB.Dom.getStyle(c,'height'))+parseFloat(FB.Dom.getStyle(c,'borderBottomWidth')));b.innerHTML=FB.String.format('<div class="fb_buttons">'+'<a href="#" class="fb_bar_close">'+'<img src="{1}" alt="{2}" title="{2}"/>'+'</a>'+'</div>'+'<a href="{7}" class="fb_profile" target="_f">'+'<img src="{3}" alt="{4}" title="{4}"/>'+'</a>'+'{5}'+' <span>'+'<a href="{8}" class="fb_learn_more" target="_blank">{6}</a> &ndash; '+'<a href="#" class="fb_no_thanks">{0}</a>'+'</span>',FB.Intl._tx("Nie, dzi\u0119kuj\u0119"),FB.getDomain('cdn')+FB.XFBML.ConnectBar.imgs.buttonUrl,FB.Intl._tx("Zamknij"),d[this._picFieldName]||FB.getDomain('cdn')+FB.XFBML.ConnectBar.imgs.missingProfileUrl,FB.String.escapeHTML(d.first_name),FB.Intl._tx("Witaj {firstName}! \u003cstrong>{siteName}\u003cstrong> u\u017cywa Facebooka, aby spersonalizowa\u0107 Twoje funkcje.",{firstName:FB.String.escapeHTML(d.first_name),siteName:FB.String.escapeHTML(d.site_name)}),FB.Intl._tx("Dowiedz si\u0119 wi\u0119cej"),d.profile_url,FB.getDomain('www')+'sitetour/connect.php');var a=this;FB.Array.forEach(b.getElementsByTagName('a'),function(g){g.onclick=FB.bind(a._clickHandler,a);});this._page=document.body;var f=0;if(this._page.parentNode){f=Math.round((parseFloat(FB.Dom.getStyle(this._page.parentNode,'height'))-parseFloat(FB.Dom.getStyle(this._page,'height')))/2);}else f=parseInt(FB.Dom.getStyle(this._page,'marginTop'),10);f=isNaN(f)?0:f;this._initTopMargin=f;if(!window.XMLHttpRequest){c.className+=" fb_connect_bar_container_ie6";}else{c.style.top=(-1*this._initialHeight)+'px';FB.Anim.ate(c,{top:'0px'},this._animationSpeed);}var e={marginTop:this._initTopMargin+this._initialHeight+'px'};if(FB.UA.ie()){e.backgroundPositionY=this._initialHeight+'px';}else e.backgroundPosition='? '+this._initialHeight+'px';FB.Anim.ate(this._page,e,this._animationSpeed);},_clickHandler:function(a){a=a||window.event;var b=a.target||a.srcElement;while(b.nodeName!='A')b=b.parentNode;switch(b.className){case 'fb_bar_close':FB.api({method:'Connect.connectBarMarkAcknowledged'});FB.Insights.impression({lid:104,name:'widget_user_closed'});this._closeConnectBar();break;case 'fb_learn_more':case 'fb_profile':window.open(b.href);break;case 'fb_no_thanks':this._closeConnectBar();FB.api({method:'Connect.connectBarMarkAcknowledged'});FB.Insights.impression({lid:104,name:'widget_user_no_thanks'});FB.api({method:'auth.revokeAuthorization',block:true},this.bind(function(){this.fire('connectbar.ondeauth');FB.Event.fire('connectbar.ondeauth',this);FB.Helper.invokeHandler(this.getAttribute('on-deauth'),this);if(this._getBoolAttribute('auto-refresh',true))window.location.reload();}));break;}return false;},_closeConnectBar:function(){this._notDisplayed=true;var a={marginTop:this._initTopMargin+'px'};if(FB.UA.ie()){a.backgroundPositionY='0px';}else a.backgroundPosition='? 0px';var b=(this._animationSpeed==0)?0:300;FB.Anim.ate(this._page,a,b);FB.Anim.ate(this._container,{top:(-1*this._initialHeight)+'px'},b,function(c){c.parentNode.removeChild(c);});this.fire('connectbar.onclose');FB.Event.fire('connectbar.onclose',this);FB.Helper.invokeHandler(this.getAttribute('on-close'),this);}});FB.provide('XFBML.ConnectBar',{imgs:{buttonUrl:'images/facebook-widgets/close_btn.png',missingProfileUrl:'pics/q_silhouette.gif'}});
FB.subclass('XFBML.Facepile','XFBML.IframeWidget',null,{_visibleAfter:'load',_extraParams:{},setupAndValidate:function(){this._attr={href:this.getAttribute('href'),channel:this.getChannelUrl(),max_rows:this.getAttribute('max-rows'),action:this.getAttribute('action','like'),width:this._getPxAttribute('width',200),ref:this.getAttribute('ref'),size:this.getAttribute('size','small'),login_text:this.dom.innerHTML};this.clear();for(var a in this._extraParams)this._attr[a]=this._extraParams[a];return true;},setExtraParams:function(a){this._extraParams=a;},oneTimeSetup:function(){var a=FB._userStatus;FB.Event.subscribe('auth.statusChange',FB.bind(function(b){if(a=='connected'||b.status=='connected')this.process(true);a=b.status;},this));},getSize:function(){if(this._attr.size=='large')return {width:this._attr.width,height:90};return {width:this._attr.width,height:70};},getUrlBits:function(){return {name:'facepile',params:this._attr};}});
FB.subclass('XFBML.Fan','XFBML.IframeWidget',null,{_visibleAfter:'load',setupAndValidate:function(){this._attr={api_key:FB._apiKey,connections:this.getAttribute('connections','10'),css:this.getAttribute('css'),height:this._getPxAttribute('height'),id:this.getAttribute('profile-id'),logobar:this._getBoolAttribute('logo-bar'),name:this.getAttribute('name'),stream:this._getBoolAttribute('stream',true),width:this._getPxAttribute('width',300)};if(!this._attr.id&&!this._attr.name){FB.log('<fb:fan> requires one of the "id" or "name" attributes.');return false;}var a=this._attr.height;if(!a)if((!this._attr.connections||this._attr.connections==='0')&&!this._attr.stream){a=65;}else if(!this._attr.connections||this._attr.connections==='0'){a=375;}else if(!this._attr.stream){a=250;}else a=550;if(this._attr.logobar)a+=25;this._attr.height=a;return true;},getSize:function(){return {width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return {name:'fan',params:this._attr};}});
FB.subclass('XFBML.Friendpile','XFBML.Facepile',null,{});
FB.subclass('XFBML.EdgeCommentWidget','XFBML.IframeWidget',function(a){this._iframeWidth=a.width+1;this._iframeHeight=a.height;this._attr={master_frame_name:a.masterFrameName};this.dom=a.commentNode;this.dom.style.top=a.relativeHeightOffset;if(a.relativeWidthOffset)if(FB._localeIsRtl){this.dom.style.right=a.relativeWidthOffset;}else this.dom.style.left=a.relativeWidthOffset;this.dom.style.zIndex=FB.XFBML.EdgeCommentWidget.NextZIndex++;FB.Dom.addCss(this.dom,'fb_edge_comment_widget');},{_visibleAfter:'load',_showLoader:false,getSize:function(){return {width:this._iframeWidth,height:this._iframeHeight};},getUrlBits:function(){return {name:'comment_widget_shell',params:this._attr};}});FB.provide('XFBML.EdgeCommentWidget',{NextZIndex:10000});
FB.subclass('XFBML.EdgeWidget','XFBML.IframeWidget',null,{_visibleAfter:'immediate',_showLoader:false,setupAndValidate:function(){FB.Dom.addCss(this.dom,'fb_edge_widget_with_comment');this._attr={channel_url:this.getChannelUrl(),debug:this._getBoolAttribute('debug'),href:this.getAttribute('href',window.location.href),is_permalink:this._getBoolAttribute('is-permalink'),node_type:this.getAttribute('node-type','link'),width:this._getWidgetWidth(),font:this.getAttribute('font'),layout:this._getLayout(),colorscheme:this.getAttribute('color-scheme'),action:this.getAttribute('action'),ref:this.getAttribute('ref'),show_faces:this._shouldShowFaces(),no_resize:this._getBoolAttribute('no_resize'),send:this.getAttribute('send'),url_map:this.getAttribute('url_map')};return true;},oneTimeSetup:function(){this.subscribe('xd.authPrompted',FB.bind(this._onAuthPrompt,this));this.subscribe('xd.edgeCreated',FB.bind(this._onEdgeCreate,this));this.subscribe('xd.edgeRemoved',FB.bind(this._onEdgeRemove,this));this.subscribe('xd.presentEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogPresentation,this));this.subscribe('xd.dismissEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogDismissal,this));this.subscribe('xd.hideEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogHide,this));this.subscribe('xd.showEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogShow,this));},getSize:function(){return {width:this._getWidgetWidth(),height:this._getWidgetHeight()};},_getWidgetHeight:function(){var b=this._getLayout();var e=this._shouldShowFaces()?'show':'hide';var d=this.getAttribute('send');var a=65+(d&&d!=='false'?25:0);var c={standard:{show:80,hide:35},box_count:{show:a,hide:a},button_count:{show:21,hide:21},simple:{show:20,hide:20}};return c[b][e];},_getWidgetWidth:function(){var e=this._getLayout();var g=this.getAttribute('send');var h=this._shouldShowFaces()?'show':'hide';var c=(this.getAttribute('action')==='recommend'?130:90)+(g&&g!=='false'?60:0);var b=this.getAttribute('action')==='recommend'?100:55;var i=this.getAttribute('action')==='recommend'?90:50;var f={standard:{show:450,hide:450},box_count:{show:b,hide:b},button_count:{show:c,hide:c},simple:{show:i,hide:i}};var d=f[e][h];var j=this._getPxAttribute('width',d);var a={standard:{min:225,max:900},box_count:{min:b,max:900},button_count:{min:c,max:900},simple:{min:49,max:900}};if(j<a[e].min){j=a[e].min;}else if(j>a[e].max)j=a[e].max;return j;},_getLayout:function(){return this._getAttributeFromList('layout','standard',['standard','button_count','box_count','simple']);},_shouldShowFaces:function(){return this._getLayout()==='standard'&&this._getBoolAttribute('show-faces',true);},_handleEdgeCommentDialogPresentation:function(b){if(!this.isValid())return;var a=document.createElement('span');this._commentSlave=this._createEdgeCommentWidget(b,a);this.dom.appendChild(a);this._commentSlave.process();this._commentWidgetNode=a;},_createEdgeCommentWidget:function(b,a){var c={commentNode:a,externalUrl:b.externalURL,width:400,height:225,masterFrameName:b.masterFrameName,layout:this._getLayout(),relativeHeightOffset:this._getHeightOffset(b),relativeWidthOffset:this._getWidthOffset(b)};return new FB.XFBML.EdgeCommentWidget(c);},_getHeightOffset:function(c){if(c&&c.preComputedHeightOffset)return parseInt(c.preComputedHeightOffset,10)+'px';var a=this._getLayout();var b={standard:'22px',button_count:'19px',box_count:'-5px',simple:'18px'};return b[a];},_getCommonEdgeCommentWidgetOpts:function(c,a,d,b){return {colorscheme:this._attr.colorscheme,commentNode:a,controllerID:c.controllerID,nodeImageURL:c.nodeImageURL,nodeRef:this._attr.ref,nodeTitle:c.nodeTitle,nodeURL:c.nodeURL,nodeSummary:c.nodeSummary,width:400,height:300,relativeHeightOffset:(b?this._getHeightOffset(c):this._getHeightOffset()),relativeWidthOffset:(d?this._getWidthOffset(c):this._getWidthOffset()),error:c.error,siderender:c.siderender};},_getWidthOffset:function(c){if(c&&c.preComputedWidthOffset)return parseInt(c.preComputedWidthOffset,10)+'px';var a=this._getLayout();var b={standard:'0px',box_count:'0px',button_count:'0px',simple:'0px'};return b[a];},_handleEdgeCommentDialogDismissal:function(a){if(this._commentWidgetNode){this.dom.removeChild(this._commentWidgetNode);delete this._commentWidgetNode;}},_handleEdgeCommentDialogHide:function(){if(this._commentWidgetNode)this._commentWidgetNode.style.display="none";},_handleEdgeCommentDialogShow:function(){if(this._commentWidgetNode)this._commentWidgetNode.style.display="block";},_fireEventAndInvokeHandler:function(b,a){FB.Helper.fireEvent(b,this);FB.Helper.invokeHandler(this.getAttribute(a),this,[this._attr.href]);},_onEdgeCreate:function(){this._fireEventAndInvokeHandler('edge.create','on-create');},_onEdgeRemove:function(){this._fireEventAndInvokeHandler('edge.remove','on-remove');},_onAuthPrompt:function(){this._fireEventAndInvokeHandler('auth.prompt','on-prompt');}});
FB.subclass('XFBML.SendButtonFormWidget','XFBML.EdgeCommentWidget',function(a){this._base(a);FB.Dom.addCss(this.dom,'fb_send_button_form_widget');FB.Dom.addCss(this.dom,a.colorscheme);FB.Dom.addCss(this.dom,(typeof a.siderender!='undefined'&&a.siderender)?'siderender':'');this._attr.nodeImageURL=a.nodeImageURL;this._attr.nodeRef=a.nodeRef;this._attr.nodeTitle=a.nodeTitle;this._attr.nodeURL=a.nodeURL;this._attr.nodeSummary=a.nodeSummary;this._attr.channel=this.getChannelUrl();this._attr.controllerID=a.controllerID;this._attr.colorscheme=a.colorscheme;this._attr.error=a.error;this._attr.siderender=a.siderender;},{_showLoader:true,getUrlBits:function(){return {name:'send_button_form_shell',params:this._attr};},oneTimeSetup:function(){this.subscribe('xd.messageSent',FB.bind(this._onMessageSent,this));},_onMessageSent:function(){FB.Event.fire('message.send',this._attr.nodeURL,this);}});
FB.subclass('XFBML.Send','XFBML.EdgeWidget',null,{setupAndValidate:function(){FB.Dom.addCss(this.dom,'fb_edge_widget_with_comment');this._attr={channel:this.getChannelUrl(),api_key:FB._apiKey,font:this.getAttribute('font'),colorscheme:this.getAttribute('colorscheme','light'),href:this.getAttribute('href',window.location.href),ref:this.getAttribute('ref')};return true;},getUrlBits:function(){return {name:'send',params:this._attr};},_createEdgeCommentWidget:function(b,a){var c=this._getCommonEdgeCommentWidgetOpts(b,a);return new FB.XFBML.SendButtonFormWidget(c);},_getHeightOffset:function(){return '21px';},_getWidthOffset:function(){return '0px';},getSize:function(){return {width:FB.XFBML.Send.Dimensions.width,height:FB.XFBML.Send.Dimensions.height};}});FB.provide('XFBML.Send',{Dimensions:{width:56,height:25}});
FB.subclass('XFBML.Like','XFBML.EdgeWidget',null,{_widgetPipeEnabled:true,getUrlBits:function(){return {name:'like',params:this._attr};},_createEdgeCommentWidget:function(b,a){if('send' in this._attr&&'widget_type' in b&&b.widget_type=='send'){var c=this._getCommonEdgeCommentWidgetOpts(b,a,true,true);return new FB.XFBML.SendButtonFormWidget(c);}else return this._callBase("_createEdgeCommentWidget",b,a);},getIframeTitle:function(){return 'Like this content on Facebook.';}});
FB.subclass('XFBML.LikeBox','XFBML.IframeWidget',null,{_visibleAfter:'load',setupAndValidate:function(){this._attr={channel:this.getChannelUrl(),api_key:FB._apiKey,connections:this.getAttribute('connections'),css:this.getAttribute('css'),height:this.getAttribute('height'),id:this.getAttribute('profile-id'),header:this._getBoolAttribute('header',true),name:this.getAttribute('name'),show_faces:this._getBoolAttribute('show-faces',true),stream:this._getBoolAttribute('stream',true),width:this._getPxAttribute('width',300),href:this.getAttribute('href'),colorscheme:this.getAttribute('colorscheme','light'),border_color:this.getAttribute('border_color')};if(this._getBoolAttribute('force_wall',false))this._attr.force_wall=true;if(this._attr.connections==='0'){this._attr.show_faces=false;}else if(this._attr.connections)this._attr.show_faces=true;if(!this._attr.id&&!this._attr.name&&!this._attr.href){FB.log('<fb:like-box> requires one of the "id" or "name" attributes.');return false;}var a=this._attr.height;if(!a)if(!this._attr.show_faces&&!this._attr.stream){a=62;}else{a=95;if(this._attr.show_faces)a+=163;if(this._attr.stream)a+=300;if(this._attr.header&&this._attr.header!=='0')a+=32;}this._attr.height=a;this.subscribe('xd.likeboxLiked',FB.bind(this._onLiked,this));this.subscribe('xd.likeboxUnliked',FB.bind(this._onUnliked,this));return true;},getSize:function(){return {width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return {name:'likebox',params:this._attr};},_onLiked:function(){FB.Helper.fireEvent('edge.create',this);},_onUnliked:function(){FB.Helper.fireEvent('edge.remove',this);}});
FB.subclass('XFBML.LiveStream','XFBML.IframeWidget',null,{_visibleAfter:'load',setupAndValidate:function(){this._attr={height:this._getPxAttribute('height',500),hideFriendsTab:this.getAttribute('hide-friends-tab'),redesigned:this._getBoolAttribute('redesigned-stream'),width:this._getPxAttribute('width',400),xid:this.getAttribute('xid','default'),always_post_to_friends:this._getBoolAttribute('always-post-to-friends',false),via_url:this.getAttribute('via_url')};return true;},getSize:function(){return {width:this._attr.width,height:this._attr.height};},getUrlBits:function(){var a=this._attr.redesigned?'live_stream_box':'livefeed';return {name:a,params:this._attr};}});
FB.subclass('XFBML.Login','XFBML.Facepile',null,{_visibleAfter:'load',getSize:function(){return {width:this._attr.width,height:94};},getUrlBits:function(){return {name:'login',params:this._attr};}});
FB.subclass('XFBML.LoginButton','XFBML.ButtonElement',null,{setupAndValidate:function(){if(this._alreadySetup)return true;this._alreadySetup=true;this._attr={autologoutlink:this._getBoolAttribute('auto-logout-link'),length:this._getAttributeFromList('length','short',['long','short']),onlogin:this.getAttribute('on-login'),perms:this.getAttribute('perms'),registration_url:this.getAttribute('registration-url'),status:'unknown'};if(this._attr.autologoutlink)FB.Event.subscribe('auth.statusChange',FB.bind(this.process,this));if(this._attr.registration_url){FB.Event.subscribe('auth.statusChange',this._saveStatus(this.process,false));FB.getLoginStatus(this._saveStatus(this.process,false));}return true;},getButtonMarkup:function(){var a=this.getOriginalHTML();if(a)return a;if(!this._attr.registration_url){if(FB.getSession()&&this._attr.autologoutlink){return FB.Intl._tx("Wylogowanie z Facebooka");}else return this._getLoginText();}else switch(this._attr.status){case 'unknown':return this._getLoginText();case 'notConnected':return FB.Intl._tx("Zarejestruj si\u0119");case 'connected':if(FB.getSession()&&this._attr.autologoutlink)return FB.Intl._tx("Wylogowanie z Facebooka");return this._getLoginText();default:FB.log('Unknown status: '+this.status);return FB.Intl._tx("Zaloguj si\u0119");}},_getLoginText:function(){return this._attr.length=='short'?FB.Intl._tx("Zaloguj si\u0119"):FB.Intl._tx("Zaloguj si\u0119 przy u\u017cyciu danych z Facebooka");},onClick:function(){if(!this._attr.registration_url){if(!FB.getSession()||!this._attr.autologoutlink){FB.login(FB.bind(this._authCallback,this),{perms:this._attr.perms});}else FB.logout(FB.bind(this._authCallback,this));}else switch(this._attr.status){case 'unknown':FB.ui({method:'auth.logintoFacebook'},FB.bind(function(a){FB.bind(FB.getLoginStatus(this._saveStatus(this._authCallback,true),true),this);},this));break;case 'notConnected':window.top.location=this._attr.registration_url;break;case 'connected':if(!FB.getSession()||!this._attr.autologoutlink){this._authCallback();}else FB.logout(FB.bind(this._authCallback,this));break;default:FB.log('Unknown status: '+this.status);}},_authCallback:function(a){FB.Helper.invokeHandler(this._attr.onlogin,this,[a]);},_saveStatus:function(a,b){return FB.bind(function(c){if(b&&this._attr.registration_url&&this._attr.status=='notConnected'&&c.status=='notConnected')window.top.location=this._attr.registration_url;this._attr.status=c.status;if(a){a=this.bind(a,this);return a(c);}},this);}});
FB.subclass('XFBML.Name','XFBML.Element',null,{process:function(){FB.copy(this,{_uid:this.getAttribute('uid'),_firstnameonly:this._getBoolAttribute('first-name-only'),_lastnameonly:this._getBoolAttribute('last-name-only'),_possessive:this._getBoolAttribute('possessive'),_reflexive:this._getBoolAttribute('reflexive'),_objective:this._getBoolAttribute('objective'),_linked:this._getBoolAttribute('linked',true),_subjectId:this.getAttribute('subject-id')});if(!this._uid){FB.log('"uid" is a required attribute for <fb:name>');this.fire('render');return;}var b=[];if(this._firstnameonly){b.push('first_name');}else if(this._lastnameonly){b.push('last_name');}else b.push('name');if(this._subjectId){b.push('sex');if(this._subjectId==FB.Helper.getLoggedInUser())this._reflexive=true;}var a;FB.Event.monitor('auth.statusChange',this.bind(function(){if(!this.isValid()){this.fire('render');return true;}if(!this._uid||this._uid=='loggedinuser')this._uid=FB.Helper.getLoggedInUser();if(!this._uid)return;if(FB.Helper.isUser(this._uid)){a=FB.Data._selectByIndex(b,'user','uid',this._uid);}else a=FB.Data._selectByIndex(['name','id'],'profile','id',this._uid);a.wait(this.bind(function(c){if(this._subjectId==this._uid){this._renderPronoun(c[0]);}else this._renderOther(c[0]);this.fire('render');}));}));},_renderPronoun:function(b){var c='',a=this._objective;if(this._subjectId){a=true;if(this._subjectId===this._uid)this._reflexive=true;}if(this._uid==FB.Connect.get_loggedInUser()&&this._getBoolAttribute('use-you',true)){if(this._possessive){if(this._reflexive){c='your own';}else c='your';}else if(this._reflexive){c='yourself';}else c='you';}else switch(b.sex){case 'male':if(this._possessive){c=this._reflexive?'his own':'his';}else if(this._reflexive){c='himself';}else if(a){c='him';}else c='he';break;case 'female':if(this._possessive){c=this._reflexive?'her own':'her';}else if(this._reflexive){c='herself';}else if(a){c='her';}else c='she';break;default:if(this._getBoolAttribute('use-they',true)){if(this._possessive){if(this._reflexive){c='their own';}else c='their';}else if(this._reflexive){c='themselves';}else if(a){c='them';}else c='they';}else if(this._possessive){if(this._reflexive){c='his/her own';}else c='his/her';}else if(this._reflexive){c='himself/herself';}else if(a){c='him/her';}else c='he/she';break;}if(this._getBoolAttribute('capitalize',false))c=FB.Helper.upperCaseFirstChar(c);this.dom.innerHTML=c;},_renderOther:function(c){var b='',a='';if(this._uid==FB.Helper.getLoggedInUser()&&this._getBoolAttribute('use-you',true)){if(this._reflexive){if(this._possessive){b='your own';}else b='yourself';}else if(this._possessive){b='your';}else b='you';}else if(c){if(null===c.first_name)c.first_name='';if(null===c.last_name)c.last_name='';if(this._firstnameonly&&c.first_name!==undefined){b=FB.String.escapeHTML(c.first_name);}else if(this._lastnameonly&&c.last_name!==undefined)b=FB.String.escapeHTML(c.last_name);if(!b)b=FB.String.escapeHTML(c.name);if(b!==''&&this._possessive)b+='\'s';}if(!b)b=FB.String.escapeHTML(this.getAttribute('if-cant-see','Facebook User'));if(b){if(this._getBoolAttribute('capitalize',false))b=FB.Helper.upperCaseFirstChar(b);if(c&&this._linked){a=FB.Helper.getProfileLink(c,b,this.getAttribute('href',null));}else a=b;}this.dom.innerHTML=a;}});
FB.subclass('XFBML.ProfilePic','XFBML.Element',null,{process:function(){var d=this.getAttribute('size','thumb'),b=FB.XFBML.ProfilePic._sizeToPicFieldMap[d],g=this._getPxAttribute('width'),a=this._getPxAttribute('height'),e=this.dom.style,f=this.getAttribute('uid');if(this._getBoolAttribute('facebook-logo'))b+='_with_logo';if(g){g=g+'px';e.width=g;}if(a){a=a+'px';e.height=a;}var c=this.bind(function(j){var l=j?j[0]:null,i=l?l[b]:null;if(!i)i=FB.getDomain('cdn')+FB.XFBML.ProfilePic._defPicMap[b];var k=((g?'width:'+g+';':'')+(a?'height:'+g+';':'')),h=FB.String.format('<img src="{0}" alt="{1}" title="{1}" style="{2}" class="{3}" />',i,l?FB.String.escapeHTML(l.name):'',k,this.dom.className);if(this._getBoolAttribute('linked',true))h=FB.Helper.getProfileLink(l,h,this.getAttribute('href',null));this.dom.innerHTML=h;FB.Dom.addCss(this.dom,'fb_profile_pic_rendered');this.fire('render');});FB.Event.monitor('auth.statusChange',this.bind(function(){if(!this.isValid()){this.fire('render');return true;}if(this.getAttribute('uid',null)=='loggedinuser')f=FB.Helper.getLoggedInUser();if(FB._userStatus&&f){FB.Data._selectByIndex(['name',b],FB.Helper.isUser(f)?'user':'profile',FB.Helper.isUser(f)?'uid':'id',f).wait(c);}else c();}));}});FB.provide('XFBML.ProfilePic',{_defPicMap:{pic:'pics/s_silhouette.jpg',pic_big:'pics/d_silhouette.gif',pic_big_with_logo:'pics/d_silhouette_logo.gif',pic_small:'pics/t_silhouette.jpg',pic_small_with_logo:'pics/t_silhouette_logo.gif',pic_square:'pics/q_silhouette.gif',pic_square_with_logo:'pics/q_silhouette_logo.gif',pic_with_logo:'pics/s_silhouette_logo.gif'},_sizeToPicFieldMap:{n:'pic_big',normal:'pic_big',q:'pic_square',s:'pic',small:'pic',square:'pic_square',t:'pic_small',thumb:'pic_small'}});
FB.subclass('XFBML.Recommendations','XFBML.IframeWidget',null,{_visibleAfter:'load',_refreshOnAuthChange:true,setupAndValidate:function(){this._attr={border_color:this.getAttribute('border-color'),colorscheme:this.getAttribute('color-scheme'),filter:this.getAttribute('filter'),font:this.getAttribute('font'),action:this.getAttribute('action'),header:this._getBoolAttribute('header'),height:this._getPxAttribute('height',300),site:this.getAttribute('site',location.hostname),width:this._getPxAttribute('width',300)};return true;},getSize:function(){return {width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return {name:'recommendations',params:this._attr};}});
FB.subclass('XFBML.Registration','XFBML.IframeWidget',null,{_visibleAfter:'immediate',_baseHeight:167,_fieldHeight:28,_skinnyWidth:520,_skinnyBaseHeight:173,_skinnyFieldHeight:52,setupAndValidate:function(){this._attr={action:this.getAttribute('action'),border_color:this.getAttribute('border-color'),channel_url:this.getChannelUrl(),client_id:FB._apiKey,fb_only:this._getBoolAttribute('fb-only',false),fb_register:this._getBoolAttribute('fb-register',false),fields:this.getAttribute('fields'),height:this._getPxAttribute('height'),redirect_uri:this.getAttribute('redirect-uri',window.location.href),no_footer:this._getBoolAttribute('no-footer'),no_header:this._getBoolAttribute('no-header'),onvalidate:this.getAttribute('onvalidate'),width:this._getPxAttribute('width',600)};if(this._attr.onvalidate)this.subscribe('xd.validate',this.bind(function(b){var d=FB.JSON.parse(b.value);var a=this.bind(function(e){FB.Arbiter.inform('Registration.Validation',{errors:e,id:b.id},'parent.frames["'+this.getIframeNode().name+'"]',window.location.protocol=='https:');});var c=FB.Helper.executeFunctionByName(this._attr.onvalidate,d,a);if(c)a(c);}));this.subscribe('xd.authLogin',FB.bind(this._onAuthLogin,this));this.subscribe('xd.authLogout',FB.bind(this._onAuthLogout,this));return true;},getSize:function(){return {width:this._attr.width,height:this._getHeight()};},_getHeight:function(){if(this._attr.height)return this._attr.height;var b;if(!this._attr.fields){b=['name'];}else try{b=FB.JSON.parse(this._attr.fields);}catch(a){b=this._attr.fields.split(/,/);}if(this._attr.width<this._skinnyWidth){return this._skinnyBaseHeight+b.length*this._skinnyFieldHeight;}else return this._baseHeight+b.length*this._fieldHeight;},getUrlBits:function(){return {name:'registration',params:this._attr};},_onAuthLogin:function(){if(!FB.getSession())FB.getLoginStatus();FB.Helper.fireEvent('auth.login',this);},_onAuthLogout:function(){if(!FB.getSession())FB.getLoginStatus();FB.Helper.fireEvent('auth.logout',this);}});
FB.subclass('XFBML.ServerFbml','XFBML.IframeWidget',null,{_visibleAfter:'resize',setupAndValidate:function(){this._attr={channel_url:this.getChannelUrl(),fbml:this.getAttribute('fbml'),width:this._getPxAttribute('width')};if(!this._attr.fbml){var a=this.dom.getElementsByTagName('script')[0];if(a&&a.type==='text/fbml')this._attr.fbml=a.innerHTML;}if(!this._attr.fbml){FB.log('<fb:serverfbml> requires the "fbml" attribute.');return false;}return true;},getSize:function(){return {width:this._attr.width,height:this._attr.height};},getUrlBits:function(){return {name:'serverfbml',params:this._attr};}});
FB.subclass('XFBML.ShareButton','XFBML.Element',null,{process:function(){this._href=this.getAttribute('href',window.location.href);this._type=this.getAttribute('type','icon_link');FB.Dom.addCss(this.dom,'fb_share_count_hidden');this._renderButton(true);},_renderButton:function(h){if(!this.isValid()){this.fire('render');return;}var d='',e='',f='',c='',g=FB.Intl._tx("Udost\u0119pnij"),i='';switch(this._type){case 'icon':case 'icon_link':c='fb_button_simple';d=('<span class="fb_button_text">'+(this._type=='icon_link'?g:'&nbsp;')+'</span>');h=false;break;case 'link':d=FB.Intl._tx("Udost\u0119pnij na Facebooku");h=false;break;case 'button':d='<span class="fb_button_text">'+g+'</span>';c='fb_button fb_button_small';h=false;break;case 'button_count':d='<span class="fb_button_text">'+g+'</span>';e=('<span class="fb_share_count_nub_right">&nbsp;</span>'+'<span class="fb_share_count fb_share_count_right">'+this._getCounterMarkup()+'</span>');c='fb_button fb_button_small';break;default:d='<span class="fb_button_text">'+g+'</span>';f=('<span class="fb_share_count_nub_top">&nbsp;</span>'+'<span class="fb_share_count fb_share_count_top">'+this._getCounterMarkup()+'</span>');c='fb_button fb_button_small';i='fb_share_count_wrapper';}var b=FB.guid();this.dom.innerHTML=FB.String.format('<span class="{0}">{4}<a id="{1}" class="{2}" '+'target="_blank">{3}</a>{5}</span>',i,b,c,d,f,e);var a=document.getElementById(b);a.href=this._href;a.onclick=function(){FB.ui({method:'stream.share',u:this._href});return false;};if(!h)this.fire('render');},_getCounterMarkup:function(){if(!this._count)this._count=FB.Data._selectByIndex(['total_count'],'link_stat','url',this._href);var b='0';if(this._count.value!==undefined){if(this._count.value.length>0){var a=this._count.value[0].total_count;if(a>3){FB.Dom.removeCss(this.dom,'fb_share_count_hidden');b=a>=1e+07?Math.round(a/1e+06)+'M':(a>=10000?Math.round(a/1000)+'K':a);}}}else this._count.wait(FB.bind(this._renderButton,this,false));return '<span class="fb_share_count_inner">'+b+'</span>';}});
FB.subclass('XFBML.SocialBar','XFBML.EdgeWidget',function(a){if(FB.XFBML.SocialBar.oInstance)return FB.XFBML.SocialBar.oInstance;this.dom=a;FB.XFBML.SocialBar.oInstance=this;return this;},{_fetchPreCachedLoader:false,_showLoader:false,_initialWidth:860,_initialHeight:34,_barIframe:null,_currentZ:0,_refreshOnAuthChange:true,_visibleAfter:'load',_getPageWidth:function(){var a=this._barIframe;var b=parseInt(FB.Dom.getStyle(a.parentNode,'width'),10);if(isNaN(b))b=parseInt(a.parentNode.offsetWidth,10);return b;},_minimizeToolbar:function(c){var a=this._barIframe;c.resetWidth=false;var d=300;if(c.width=='100%'){c.resetWidth=true;c.width=this._getPageWidth();}if(a.offsetWidth!=c.width){FB.Anim.ate(a,{width:c.width+'px'},d,function(e){if(c.resetWidth)FB.Dom.setStyle(e,'width','100%');});var b=this.dom.getElementsByTagName('iframe');FB.Array.forEach(b,function(e){if(e.parentNode.id=='fb_social_bar_container')return;if(!e._isHidden){e._origHeight=parseInt(FB.Dom.getStyle(e,'height'),10);e._origWidth=parseInt(FB.Dom.getStyle(e,'width'),10);e._origRight=parseInt(FB.Dom.getStyle(e,'right'),10);e._origLeft=parseInt(FB.Dom.getStyle(e,'left'),10);e._isHidden=true;FB.Anim.ate(e,{height:'0px',width:'0px',right:c.width+'px',left:(a.offsetWidth-c.width)+'px',opacity:0},d);}else{FB.Anim.ate(e,{height:e._isClosed?'0px':e._origHeight+'px',width:e._origWidth+'px',right:e._origRight+'px',left:e._origLeft+'px',opacity:100},d);e._isHidden=false;}});}},_spawnChild:function(f){var d=this._barIframe,i,g,h=document.createElement('i');if(!f.position||f.position!='left'){g=parseInt(FB.Dom.getStyle(d.parentNode,'paddingRight'),10)+(f.position?0:parseInt(f.minimizeWidth,10));i='right';}else{g=parseInt(FB.Dom.getStyle(d.parentNode,'paddingLeft'),10)+parseInt(f.offsetLeft?f.offsetLeft:0,10);i='left';}if(f.name in window.frames){var e=this.dom.getElementsByTagName?this.dom.getElementsByTagName('iframe'):document.getElementsByTagName('iframe');for(var c=0;c<e.length;c++){var b=e[c];if(b.name==f.name){b.style.width=f.width;b._isClosed=false;FB.Anim.ate(b,{height:f.height,opacity:100});}}}else{d.parentNode.appendChild(h);var a=this;FB.Content.insertIframe({root:h,name:f.name,url:f.src,className:'fb_social_bar_iframe',width:parseInt(f.width,10),height:0,onload:function(j){j.style.position='absolute';j.style[a._attr.position]=a._initialHeight+'px';j.style.height='0px';j.style[i]=g+'px';j.style.zIndex=++a._currentZ;FB.Dom.setStyle(j,'opacity',0);FB.Anim.ate(j,{height:f.height,opacity:100});j._isClosed=false;}});}FB.Array.forEach(document.getElementsByTagName('object'),function(j){FB.Dom.setStyle(j,'visibility','hidden');});},_closeChild:function(c){var b=this.dom.getElementsByTagName?this.dom.getElementsByTagName('iframe'):document.getElementsByTagName('iframe');var d=function(e){if(c.remove)e.parentNode.parentNode.removeChild(e.parentNode);};for(var a=0;a<b.length;a++)if(b[a].name==c.name){b[a]._isClosed=true;FB.Anim.ate(b[a],{height:'0px',opacity:0},300,d);}FB.Array.forEach(document.getElementsByTagName('object'),function(e){FB.Dom.setStyle(e,'visibility','');});},_expand:function(){FB.Dom.setStyle(this._barIframe,'height','100%');FB.Dom.setStyle(this._barIframe.parentNode,'height','100%');},_shrink:function(){FB.Dom.setStyle(this._barIframe,'height','34px');FB.Dom.setStyle(this._barIframe.parentNode,'height','34px');},_iframeOnload:function(c){this._barIframe=c;var b=c.parentNode;var d=true;b.id='fb_social_bar_container';if(d){FB.Dom.setStyle(c,'width','100%');}else FB.Dom.setStyle(c,'width','35px');this._currentZ+=parseInt(FB.Dom.getStyle(c,'zIndex'),10);if(isNaN(this._currentZ))this._currentZ=99999;FB.Dom.setStyle(c,'opacity',100);c.className='fb_social_bar_iframe';if(!window.XMLHttpRequest){FB.Dom.setStyle(b,'position','absolute');b.className='fb_social_bar_iframe_'+this._attr.position+'_ie6';b.parentNode.removeChild(b);document.body.appendChild(b);}else FB.Dom.setStyle(b,this._attr.position,'0px');FB.Dom.setStyle(this.dom,'display','inline');function a(){this.widgets={};}FB.copy(a.prototype,{addWidget:function(e,g,f){this.widgets[e]=FB.copy({widget:g},f);return this;},send:function(e){var f=FB.guid();var g=FB.copy({widget_pipe:FB.JSON.stringify(this.widgets)},e);FB.Content.insertIframe({url:'about:blank',root:document.getElementById('fb-root')||document.body,name:f,className:'fb_hidden',onload:function(){FB.Content.submitToTarget({url:FB._domain.www+'widget_pipe.php',target:f,params:g},true);}});},addSocialBarWidgets:function(e,g){for(var f=0;f<g.length;f++)this.addWidget(e+':'+g[f],g[f]);return this;}});new a().addSocialBarWidgets(c.name,['social_bar_controls','social_bar_profile','social_bar_like','social_bar_activity','social_bar_jewels']).send({href:window.location,site:this.getAttribute('site',location.hostname),channel:this.getChannelUrl(),api_key:FB._apiKey,locale:FB._locale,sdk:'joey',session_key:FB._session&&FB._session.session_key});},oneTimeSetup:function(){FB.Dom.setStyle(this.dom,'display','none');this.subscribe('xd.minimizeToolbar',FB.bind(this._minimizeToolbar,this));this.subscribe('xd.spawnChild',FB.bind(this._spawnChild,this));this.subscribe('xd.closeChild',FB.bind(this._closeChild,this));this.subscribe('xd.logoutSocialBar',FB.logout);this.subscribe('xd.loginSocialBar',FB.login);this.subscribe('iframe.onload',FB.bind(this._iframeOnload,this));this.subscribe('xd.presentEdgeCommentDialog',FB.bind(this._onEdgeCreate,this));this.subscribe('xd.presentEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogPresentation,this));this.subscribe('xd.dismissEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogDismissal,this));this.subscribe('xd.hideEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogHide,this));this.subscribe('xd.showEdgeCommentDialog',FB.bind(this._handleEdgeCommentDialogShow,this));this.subscribe('xd.expandBar',FB.bind(this._expand,this));this.subscribe('xd.shrinkBar',FB.bind(this._shrink,this));},_handleEdgeCommentDialogPresentation:function(c){if(!this.isValid())return;var a=document.createElement('i');var d={commentNode:a,externalUrl:c.externalURL,width:330,height:200,masterFrameName:c.masterFrameName,relativeHeightOffset:'0px'};this._commentSlave=new FB.XFBML.EdgeCommentWidget(d);var b=parseInt(FB.Dom.getStyle(this._barIframe.parentNode,'paddingLeft'),10)+parseInt(c.left,10);FB.Dom.setStyle(a,'position','absolute');FB.Dom.removeCss(a,'fb_iframe_widget');FB.Dom.setStyle(a,'top','');FB.Dom.setStyle(a,this._attr.position,this._initialHeight-1+'px');FB.Dom.setStyle(a,'left',b+'px');FB.Dom.setStyle(a,'zIndex',++this._currentZ);FB.Dom.setStyle(a,'opacity',0);this.dom.parentNode.appendChild(a);this._commentSlave.process();this._commentWidgetNode=a;},_handleEdgeCommentDialogHide:function(){if(this._commentWidgetNode){FB.Dom.removeCss(this._commentWidgetNode,'hidden_elem');FB.Anim.ate(this._commentWidgetNode,{opacity:0},300,FB.bind(function(){this._commentWidgetNode.style.display="none";},this));}},_handleEdgeCommentDialogShow:function(){if(this._commentWidgetNode){this._commentWidgetNode.style.display="block";FB.Anim.ate(this._commentWidgetNode,{opacity:100},500);}},_handleEdgeCommentDialogDismissal:function(a){if(this._commentWidgetNode){this._commentWidgetNode.parentNode.removeChild(this._commentWidgetNode);delete this._commentWidgetNode;}},getUrlBits:function(){return {name:'social_bar',params:this._attr};},getSize:function(){return {width:this._initialWidth,height:this._initialHeight};},getIframeName:function(){return 'fb_social_bar_iframe';},setupAndValidate:function(){this._attr={like:this._getBoolAttribute('like'),precache:this._getBoolAttribute('precache'),send:this._getBoolAttribute('send'),activity:this._getBoolAttribute('activity'),chat:this._getBoolAttribute('chat'),position:this._getAttributeFromList('position','bottom',['top','bottom']),href:window.location,site:this.getAttribute('site',location.hostname),channel:this.getChannelUrl()};return true;}});
void(0);


FB.provide("", {"_domain":{"api":"https:\/\/api.facebook.com\/","api_read":"https:\/\/api-read.facebook.com\/","cdn":"http:\/\/static.ak.fbcdn.net\/","graph":"https:\/\/graph.facebook.com\/","https_cdn":"https:\/\/s-static.ak.fbcdn.net\/","https_staticfb":"https:\/\/s-static.ak.facebook.com\/","https_www":"https:\/\/www.facebook.com\/","staticfb":"http:\/\/static.ak.facebook.com\/","www":"http:\/\/www.facebook.com\/","m":"http:\/\/m.facebook.com\/","https_m":"https:\/\/m.facebook.com\/"},"_locale":"pl_PL","_localeIsRtl":false}, true);
FB.provide("Flash", {"_minVersions":[[10,0,22,87]],"_swfPath":"rsrc.php\/v1\/yx\/r\/WFg56j28XFs.swf"}, true);
FB.provide("XD", {"_xdProxyUrl":"connect\/xd_proxy.php?version=3"}, true);
FB.provide("Arbiter", {"_canvasProxyUrl":"connect\/canvas_proxy.php?version=3"}, true);
FB.provide("TemplateUI", {"_version":2}, true);
FB.provide('Auth', {"_xdStorePath":"xd_localstorage\/"}, true);
FB.initSitevars = {"parseXFBMLBeforeDomReady":false,"iframePermissions":{"read_stream":false,"manage_mailbox":false,"manage_friendlists":false,"read_mailbox":false,"publish_checkins":true,"status_update":true,"photo_upload":true,"video_upload":true,"sms":false,"create_event":true,"rsvp_event":true,"offline_access":true,"email":true,"xmpp_login":false,"create_note":true,"share_item":true,"export_stream":false,"publish_stream":true,"publish_likes":true,"ads_management":false,"contact_email":true,"access_private_data":false,"read_insights":false,"read_requests":false,"read_friendlists":true,"manage_pages":false,"physical_login":false,"manage_groups":false,"read_deals":false}}; FB.widgetPipeEnabledApps = {"111476658864976":1,"cca6477272fc5cb805f85a84f20fca1d":1,"179150165472010":1}; FB.widgetPipeTagCountThreshold = 4;
FB.provide("Canvas.EarlyFlush", {"_appIdsBlacklist":[],"_sampleRate":500}, true);
FB.provide("XFBML.ConnectBar", {"imgs":{"buttonUrl":"rsrc.php\/v1\/yY\/r\/h_Y6u1wrZPW.png","missingProfileUrl":"rsrc.php\/v1\/yo\/r\/UlIqmHJn-SK.gif"}}, true);
FB.provide("XFBML.ProfilePic", {"_defPicMap":{"pic":"rsrc.php\/v1\/yh\/r\/C5yt7Cqf3zU.jpg","pic_big":"rsrc.php\/v1\/yL\/r\/HsTZSDw4avx.gif","pic_big_with_logo":"rsrc.php\/v1\/y5\/r\/SRDCaeCL7hM.gif","pic_small":"rsrc.php\/v1\/yi\/r\/odA9sNLrE86.jpg","pic_small_with_logo":"rsrc.php\/v1\/yD\/r\/k1xiRXKnlGd.gif","pic_square":"rsrc.php\/v1\/yo\/r\/UlIqmHJn-SK.gif","pic_square_with_logo":"rsrc.php\/v1\/yX\/r\/9dYJBPDHXwZ.gif","pic_with_logo":"rsrc.php\/v1\/yu\/r\/fPPR9f2FJ3t.gif"}}, true);
if (FB.Dom && FB.Dom.addCssRules) { FB.Dom.addCssRules(".fb_hidden{position:absolute;top:-10000px;z-index:10001}\n.fb_reset{background:none;border-spacing:0;border:0;color:#000;cursor:auto;direction:ltr;font-family:\"lucida grande\", tahoma, verdana, arial, sans-serif;font-size: 11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal}\n.fb_link img{border:none}\n.fb_dialog{position:absolute;top:-10000px;z-index:10001}\n.fb_dialog_advanced{background:rgba(82, 82, 82, .7);padding:10px;-moz-border-radius:8px;-webkit-border-radius:8px}\n.fb_dialog_advanced.fb_mobile{background:rgba(82, 82, 82, .7);padding:3px;-moz-border-radius:2px;-webkit-border-radius:2px}\n.fb_dialog_content{background:#fff;color:#333}\n.fb_dialog_close_icon{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zq\/r\/IE9JII6Z1Ys.png) no-repeat scroll 0 0 transparent;_background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zL\/r\/s816eWC-2sl.gif);cursor:pointer;display:block;height:15px;position:absolute;right:18px;top:17px;width:15px;top:8px\\9;right:7px\\9}\n.fb_mobile .fb_dialog_close_icon{top:11px\n}\n.fb_dialog_close_icon:hover{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zq\/r\/IE9JII6Z1Ys.png) no-repeat scroll 0 -15px transparent;_background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zL\/r\/s816eWC-2sl.gif)}\n.fb_dialog_close_icon:active{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zq\/r\/IE9JII6Z1Ys.png) no-repeat scroll 0 -30px transparent;_background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zL\/r\/s816eWC-2sl.gif)}\n.fb_dialog_loader{background-color:#f2f2f2;border:1px solid #606060;font-size: 24px;padding:20px}\n.fb_dialog_top_left,\n.fb_dialog_top_right,\n.fb_dialog_bottom_left,\n.fb_dialog_bottom_right{height:10px;width:10px;overflow:hidden;position:absolute}\n.fb_dialog_top_left{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/ze\/r\/8YeTNIlTZjm.png) no-repeat 0 0;left:-10px;top:-10px}\n.fb_dialog_top_right{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/ze\/r\/8YeTNIlTZjm.png) no-repeat 0 -10px;right:-10px;top:-10px}\n.fb_dialog_bottom_left{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/ze\/r\/8YeTNIlTZjm.png) no-repeat 0 -20px;bottom:-10px;left:-10px}\n.fb_dialog_bottom_right{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/ze\/r\/8YeTNIlTZjm.png) no-repeat 0 -30px;right:-10px;bottom:-10px}\n.fb_dialog_vert_left,\n.fb_dialog_vert_right,\n.fb_dialog_horiz_top,\n.fb_dialog_horiz_bottom{position:absolute;background:#525252;filter:alpha(opacity=70);opacity:.7}\n.fb_dialog_vert_left,\n.fb_dialog_vert_right{width:10px;height:100\u0025}\n.fb_dialog_vert_left{margin-left:-10px}\n.fb_dialog_vert_right{right:0;margin-right:-10px}\n.fb_dialog_horiz_top,\n.fb_dialog_horiz_bottom{width:100\u0025;height:10px}\n.fb_dialog_horiz_top{margin-top:-10px}\n.fb_dialog_horiz_bottom{bottom:0;margin-bottom:-10px}\n.fb_dialog_iframe{line-height:0}\n.fb_dialog.loading.fb_mobile .fb_dialog_iframe{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zQ\/r\/pQebR9nCkAT.gif) no-repeat 50\u0025 50\u0025}\n.fb_dialog.loading.fb_mobile iframe{visibility:hidden}\n.fb_dialog_content .dialog_title{background:#6d84b4;border:1px solid #3b5998;color:#fff;font-size: 14px;font-weight:bold;margin:0}\n.fb_dialog_content .dialog_title > span{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zd\/r\/Cou7n-nqK52.gif) no-repeat 5px 50\u0025;float:left;padding:5px 0 7px 26px}\n.fb_dialog_content .dialog_content{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/z9\/r\/jKEcVPZFk-2.gif) no-repeat 50\u0025 50\u0025;border:1px solid #555;border-bottom:0;border-top:0;height:150px}\n.fb_dialog_content .dialog_footer{background:#f2f2f2;border:1px solid #555;border-top-color:#ccc;height:40px}\n#fb_dialog_loader_close{float:right}\n.fb_iframe_widget{position:relative;display:-moz-inline-block;display:inline-block}\n.fb_iframe_widget iframe{position:relative;vertical-align:text-bottom}\n.fb_iframe_widget span{position:relative}\n.fb_hide_iframes iframe{position:relative;left:-10000px}\n.fb_iframe_widget_loader{position:relative;display:inline-block}\n.fb_iframe_widget_loader iframe{min-height:32px;z-index:2;zoom:1}\n.fb_iframe_widget_loader .FB_Loader{background:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/z9\/r\/jKEcVPZFk-2.gif) no-repeat;height:32px;width:32px;margin-left:-16px;position:absolute;left:50\u0025;z-index:4}\n.fb_button_simple,\n.fb_button_simple_rtl{background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zH\/r\/eIpbnVKI9lR.png);background-repeat:no-repeat;cursor:pointer;outline:none;text-decoration:none}\n.fb_button_simple_rtl{background-position:right 0}\n.fb_button_simple .fb_button_text{margin:0 0 0 20px;padding-bottom:1px}\n.fb_button_simple_rtl .fb_button_text{margin:0 10px 0 0}\na.fb_button_simple:hover .fb_button_text,\na.fb_button_simple_rtl:hover .fb_button_text,\n.fb_button_simple:hover .fb_button_text,\n.fb_button_simple_rtl:hover .fb_button_text{text-decoration:underline}\n.fb_button,\n.fb_button_rtl{background:#29447e url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zL\/r\/FGFbc80dUKj.png);background-repeat:no-repeat;cursor:pointer;display:inline-block;padding:0 0 0 1px;text-decoration:none;outline:none}\n.fb_button .fb_button_text,\n.fb_button_rtl .fb_button_text{background:#5f78ab url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zL\/r\/FGFbc80dUKj.png);border-top:solid 1px #879ac0;border-bottom:solid 1px #1a356e;color:#fff;display:block;font-family:\"lucida grande\",tahoma,verdana,arial,sans-serif;font-weight:bold;padding:2px 6px 3px 6px;margin:1px 1px 0 21px;text-shadow:none}\na.fb_button,\na.fb_button_rtl,\n.fb_button,\n.fb_button_rtl{text-decoration:none}\na.fb_button:active .fb_button_text,\na.fb_button_rtl:active .fb_button_text,\n.fb_button:active .fb_button_text,\n.fb_button_rtl:active .fb_button_text{border-bottom:solid 1px #29447e;border-top:solid 1px #45619d;background:#4f6aa3;text-shadow:none}\n.fb_button_xlarge,\n.fb_button_xlarge_rtl{background-position:left -60px;font-size: 24px;line-height:30px}\n.fb_button_xlarge .fb_button_text{padding:3px 8px 3px 12px;margin-left:38px}\na.fb_button_xlarge:active{background-position:left -99px}\n.fb_button_xlarge_rtl{background-position:right -268px}\n.fb_button_xlarge_rtl .fb_button_text{padding:3px 8px 3px 12px;margin-right:39px}\na.fb_button_xlarge_rtl:active{background-position:right -307px}\n.fb_button_large,\n.fb_button_large_rtl{background-position:left -138px;font-size: 13px;line-height:16px}\n.fb_button_large .fb_button_text{margin-left:24px;padding:2px 6px 4px 6px}\na.fb_button_large:active{background-position:left -163px}\n.fb_button_large_rtl{background-position:right -346px}\n.fb_button_large_rtl .fb_button_text{margin-right:25px}\na.fb_button_large_rtl:active{background-position:right -371px}\n.fb_button_medium,\n.fb_button_medium_rtl{background-position:left -188px;font-size: 11px;line-height:14px}\na.fb_button_medium:active{background-position:left -210px}\n.fb_button_medium_rtl{background-position:right -396px}\n.fb_button_text_rtl,\n.fb_button_medium_rtl .fb_button_text{padding:2px 6px 3px 6px;margin-right:22px}\na.fb_button_medium_rtl:active{background-position:right -418px}\n.fb_button_small,\n.fb_button_small_rtl{background-position:left -232px;font-size: 10px;line-height:10px}\n.fb_button_small .fb_button_text{padding:2px 6px 3px;margin-left:17px}\na.fb_button_small:active,\n.fb_button_small:active{background-position:left -250px}\n.fb_button_small_rtl{background-position:right -440px}\n.fb_button_small_rtl .fb_button_text{padding:2px 6px;margin-right:18px}\na.fb_button_small_rtl:active{background-position:right -458px}\n.fb_share_count_wrapper{position:relative;float:left}\n.fb_share_count{background:#b0b9ec none repeat scroll 0 0;color:#333;font-family:\"lucida grande\", tahoma, verdana, arial, sans-serif;text-align:center}\n.fb_share_count_inner{background:#e8ebf2;display:block}\n.fb_share_count_right{margin-left:-1px;display:inline-block}\n.fb_share_count_right .fb_share_count_inner{border-top:solid 1px #e8ebf2;border-bottom:solid 1px #b0b9ec;margin:1px 1px 0 1px;font-size: 10px;line-height:10px;padding:2px 6px 3px;font-weight:bold}\n.fb_share_count_top{display:block;letter-spacing:-1px;line-height:34px;margin-bottom:7px;font-size: 22px;border:solid 1px #b0b9ec}\n.fb_share_count_nub_top{border:none;display:block;position:absolute;left:7px;top:35px;margin:0;padding:0;width:6px;height:7px;background-repeat:no-repeat;background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zU\/r\/bSOHtKbCGYI.png)}\n.fb_share_count_nub_right{border:none;display:inline-block;padding:0;width:5px;height:10px;background-repeat:no-repeat;background-image:url(http:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/zX\/r\/i_oIVTKMYsL.png);vertical-align:top;background-position:right 5px;z-index:10;left:2px;margin:0 2px 0 0;position:relative}\n.fb_share_no_count{display:none}\n.fb_share_size_Small .fb_share_count_right .fb_share_count_inner{font-size: 10px}\n.fb_share_size_Medium .fb_share_count_right .fb_share_count_inner{font-size: 11px;padding:2px 6px 3px;letter-spacing:-1px;line-height:14px}\n.fb_share_size_Large .fb_share_count_right .fb_share_count_inner{font-size: 13px;line-height:16px;padding:2px 6px 4px;font-weight:normal;letter-spacing:-1px}\n.fb_share_count_hidden .fb_share_count_nub_top,\n.fb_share_count_hidden .fb_share_count_top,\n.fb_share_count_hidden .fb_share_count_nub_right,\n.fb_share_count_hidden .fb_share_count_right{visibility:hidden}\n.fb_connect_bar_container div,\n.fb_connect_bar_container span,\n.fb_connect_bar_container a,\n.fb_connect_bar_container img,\n.fb_connect_bar_container strong{background:none;border-spacing:0;border:0;direction:ltr;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal;vertical-align:baseline}\n.fb_connect_bar_container{position:fixed;left:0 !important;right:0 !important;height:42px !important;padding:0 25px !important;margin:0 !important;vertical-align:middle !important;border-bottom:1px solid #333 !important;background:#3b5998 !important;z-index:99999999 !important;overflow:hidden !important}\n.fb_connect_bar_container_ie6{position:absolute;top:expression(document.compatMode==\"CSS1Compat\"? document.documentElement.scrollTop+\"px\":body.scrollTop+\"px\")}\n.fb_connect_bar{position:relative;margin:auto;height:100\u0025;width:100\u0025;padding:6px 0 0 0 !important;background:none;color:#fff !important;font-family:\"lucida grande\", tahoma, verdana, arial, sans-serif !important;font-size: 13px !important;font-style:normal !important;font-variant:normal !important;font-weight:normal !important;letter-spacing:normal !important;line-height:1 !important;text-decoration:none !important;text-indent:0 !important;text-shadow:none !important;text-transform:none !important;white-space:normal !important;word-spacing:normal !important}\n.fb_connect_bar a:hover{color:#fff}\n.fb_connect_bar .fb_profile img{height:30px;width:30px;vertical-align:middle;margin:0 6px 5px 0}\n.fb_connect_bar div a,\n.fb_connect_bar span,\n.fb_connect_bar span a{color:#bac6da;font-size: 11px;text-decoration:none}\n.fb_connect_bar .fb_buttons{float:right;margin-top:7px}\n.fb_edge_widget_with_comment{position:relative;*z-index:1000}\n.fb_edge_widget_with_comment span.fb_edge_comment_widget{position:absolute}\n.fb_edge_widget_with_comment span.fb_edge_comment_widget iframe.fb_ltr{left:-4px}\n.fb_edge_widget_with_comment span.fb_edge_comment_widget iframe.fb_rtl{left:2px}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget{left:0;z-index:1}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget .FB_Loader{left:0;top:1px;margin-top:6px;margin-left:0;background-position:50\u0025 50\u0025;background-color:#fff;height:150px;width:394px;border:1px #666 solid;border-bottom:2px solid #283e6c;z-index:1}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget.dark .FB_Loader{background-color:#000;border-bottom:2px solid #ccc}\n.fb_edge_widget_with_comment span.fb_send_button_form_widget.siderender\n.FB_Loader{margin-top:0}\n#fb_social_bar_container{position:fixed;left:0;right:0;height:34px;padding:0 25px;z-index:999999999}\n.fb_social_bar_iframe{position:relative;float:right;opacity:0;-moz-opacity:0;filter:alpha(opacity=0)}\n.fb_social_bar_iframe_bottom_ie6{bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}\n.fb_social_bar_iframe_top_ie6{bottom:auto;top:expression(eval(document.documentElement.scrollTop-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}\n", ["fb.css.base","fb.css.dialog","fb.css.iframewidget","fb.css.button","fb.css.sharebutton","fb.css.connectbarwidget","fb.css.edgecommentwidget","fb.css.sendbuttonformwidget","fb.css.socialbarwidget"]); }


