/* analitics ------------------------------------------------------------------------------------ */

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20099413-2']);
  _gaq.push(['_setDomainName', '.gelaskins-polska.pl']);
  _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);
  })();


/* carusele ------------------------------------------------------------------------------------- */

$(function(){
  $('#bx-pager').bxSlider({
  	mode: 'fade',
  	controls: false,
    speed: 600,
    pause: 5000,
    auto: true,
    pager: true
  });
});


/* twetter ------------------------------------------------------------------------------------- */

    function randomString(length) {
      var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'.split('');
      var str = '';
      for (var i = 0; i < length; i++) {
        str += chars[Math.floor(Math.random() * chars.length)];
      }
      return str;
    }
    var rnd = randomString(8);

    jQuery(function($) {
      $(".rnd").replaceWith(rnd);

      $(".tweet .code").hide().each(function(i,e){

      }).each(function(i, e){ eval($(e).text()); });
    });


/* cufon -------------------------------------------------------------------------------------- */

Cufon.replace('h1 a, h2 a',{ hover:true });
Cufon.replace('h1, h2', { fontFamily: 'archer' });

Cufon.replace('h3 a',{ hover:true });
Cufon.replace('h3', { fontFamily: 'archer medium' });

Cufon.replace('.archer a',{ hover:true });
Cufon.replace('.archer', { fontFamily: 'archer' });

Cufon.replace('.archer_medium a',{ hover:true });
Cufon.replace('.archer_medium', { fontFamily: 'archer medium' });

Cufon.replace('.featuresHeader', { fontFamily: 'archer medium' });
