
/*Yetii - Yet (E)Another Tab Interface Implementation,http://www.kminek.pl/lab/yetii/,Copyright (c) 2007 Grzegorz Wojcik,Code licensed under the BSD License: http://www.kminek.pl/bsdlicense.txt*/function Yetii(){this.defaults={id:null,active:1,timeout:null,interval:null,tabclass:'tab',activeclass:'active'};for(var n in arguments[0]){this.defaults[n]=arguments[0][n]};this.getTabs=function(){var a=[];var b=document.getElementById(this.defaults.id).getElementsByTagName('*');var c=new RegExp("(^|\\s)"+this.defaults.tabclass.replace(/\-/g,"\\-")+"(\\s|$)");for(var i=0;i<b.length;i++){if(c.test(b[i].className))a.push(b[i])}return a};this.links=document.getElementById(this.defaults.id+'-nav').getElementsByTagName('a');this.show=function(a){for(var i=0;i<this.tabs.length;i++){this.tabs[i].style.display=((i+1)==a)?'block':'none';this.links[i].className=((i+1)==a)?this.defaults.activeclass:''}};this.rotate=function(a){this.show(this.defaults.active);this.defaults.active++;if(this.defaults.active>this.tabs.length)this.defaults.active=1;var b=this;this.defaults.timeout=setTimeout(function(){b.rotate(a)},a*1000)};this.tabs=this.getTabs();this.show(this.defaults.active);var d=this;for(var i=0;i<this.links.length;i++){this.links[i].customindex=i+1;this.links[i].onclick=function(){if(d.defaults.timeout)clearTimeout(d.defaults.timeout);d.show(this.customindex);return false}}if(this.defaults.interval)this.rotate(this.defaults.interval)};








function mail_wyslij(uzytkownik,domena) {
 adres = "mailto:" + uzytkownik + "@" + domena;
 window.location = adres; 
}




/**
*
* twitterStatusUrlConverter
*
* To convert links on a twitter status to a clickable url. Also convert @ to follow link, and # to search
*
* @author: Mardix - http://mardix.wordpress.com, http://www.givemebeats.net
* @date: March 16 2009
* @license: LGPL (I don't care, it's free lol)
*
* @param string : the status
* @param bool : true|false, allow target _blank
* @param int : to truncate a link to max length
* @return String
*
* */
function twitterStatusUrlConverter($status,$targetBlank=true,$linkMaxLen=250){
  
  // The target
  $target=$targetBlank ? " target=\"_blank\" " : "";

    // convert link to url
    $status = preg_replace("/((http:\/\/|https:\/\/)[^ )
]+)/e", "'<a href=\"$1\" title=\"$1\"  $target >'. ((strlen('$1')>=$linkMaxLen ? substr('$1',0,$linkMaxLen).'...':'$1')).'</a>'", $status);

    // convert @ to follow
    $status = preg_replace("/(@([_a-z0-9\-]+))/i","<a href=\"http://twitter.com/$2\" title=\"Follow $2\" $target >$1</a>",$status);

    // convert # to search
    $status = preg_replace("/(#([_a-z0-9\-]+))/i","<a href=\"http://search.twitter.com/search?q=%23$2\" title=\"Search $1\" $target >$1</a>",$status);

    // return the status
    return $status;
}













$(document).ready(function(){

  $('#twitter0').twit('monocyklista', {
    user: 'bandi_pl',
    callback: 'bandi_pl',
    icon: true,
    username: true,
    text: true,
    count: 200,
    limit: 1,
    label: 'Mono Tweety',
    title: 'Co nowego?'
  });

  	jQuery('#parallax').jparallax({}).append(corners);

});













// http://code.google.com/p/jquery-imageframe/
$(function(){
	$.ifixpng.pixel = 'gfx/pixel.gif';
	$.imageFrame.defaultFrameStyle = 'sharp';


/*
	$('.test:not(#customFrameStyle) img').imageFrame()
	$('#block1 div div:not(.clr)').imageFrame();
	$('#block1 div h4').imageFrame();

	$('#inline strong').imageFrame();
	$('#inlineBlock p').imageFrame();

	$.imageFrame.frameStyles['roundedTL'] = {frameClass:'frameRoundedTL'};
	$('#customFrameStyle img').imageFrame('roundedTL');
*/




$.imageFrame.frameStyles['glassbox'] = {frameClass:'glassbox'};
$('#czytelnia-polecane-1 img').imageFrame('glassbox2');






	$('.test:not(#customFrameStyle) img').imageFrame()

	$.imageFrame.frameStyles['Sharp'] = {frameClass:'frameSharp'};


	$('#iF_photo_120 img').imageFrame(Sharp);
	$('#iF_photo_240 img').imageFrame('Sharp');



	$('#iF_ramka span').imageFrame();
	$('#iF_ramka_table table').imageFrame();


});

















