$(function(){
	$(".tip").tipTip({
		'delay':100,
		'fadeIn':100,
		'fadeOut': 300
	});
});
$(document).ready(function() {
	
		$('div.powrot').localScroll({
   		'stop': true,
	   	'hash': true,
   		'duration' : 3000
		});
	
		$("a.fancybox").fancybox({
			'titleShow': false,
			padding: 0
			}
		);		
		$("a.komentarz-odp").click(function() {
			var comentId = $(this).attr("id");
			var autor = $("#komentarz-"+comentId+" div.autor").text();
			$("#formularz-odp-autor").empty();
			$("#formularz-odp-autor").append('@'+autor);
			$("#odp").val(comentId);
			
		});		
		
		$(".tweet").tweet({
            username: "janszpakowski",
            join_text: "auto",
            avatar_size: 32,
            count: 3,
            auto_join_text_default: "we said,", 
            auto_join_text_ed: "we",
            auto_join_text_ing: "we were",
            auto_join_text_reply: "we replied to",
            auto_join_text_url: "we were checking out",
            loading_text: "wczytuję ćwierknięcia..."
        });	
	
	
		$("a.youtube").click(function() {
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'			: 560,
			'height'		: 340,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});
		return false;
	});    
}); 

  //gogole analitics - nowe
  
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26285001-2']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

  window.___gcfg = {lang: 'pl'};
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
