$(document).ready(function(){

	$('.celePortfolio').hover(function(){
		$('.celePortfolio').animate({
			height: '207px'
		});//.css('height','207px');
	},function(){
		$('.celePortfolio').css('height','35px');
	});

/*
	$('[class^=plastve]').hover(function(){
		var rootingElem = '#'+$(this).attr('class');
		if(rootingElem == '#plastve') rootingElem = '#'+$(this).attr('id');
		var rol    		= setTimeout("roll()", 600);
	},function(){
		clearTimeout(rol);
		$(rootingElem).css('background-position', '10px 0px');
	});

    function roll(){
		pos = $(rootingElem).css('background-position').split(' ');

		y = parseInt(pos[0]);
		if(y < -900) return false;//y = 108+10;
		if(y < 6*108*-1){
				x = 111;
		}else{
				x = 108;
		}

		rol = setTimeout("roll()",600);

		$(rootingElem).css('background-position', (y-x) +'px '+ pos[1] );
    }
*/


    $('#slider').roundabout({
         shape: 'figure8',
         minScale: 0, // tiny!
         maxScale: 1, // tiny!
         easing:'easeOutCirc',
         clickToFocus:'true',
         focusBearing:'0',
         duration:700,
         autoplay:true,
         autoplayDuration: 4000,
		     autoplayPauseOnHover: true,
         tilt:'0',
         btnNext: '.next',
         btnPrev: '.prev',
         reflect:true
    });
    
    $('a.fancybox_galerie').fancybox({
        'titlePosition':'inside'
    });

    $('a.fancybox').fancybox();

    $('.fancybox_edit').fancybox({
        'width':735,
        'height':450,
        'autoScale':true,
        'transitionIn':'none',
        'transitionOut':'none',
        'type':'iframe',
        'padding': '0',
        'margin': '0'
    });

    $('a.email').each(function(){
            e = this.title.replace('[A]','@');
            var mail_array = e.split('[+]');
            var mail = mail_array.join('')
            this.href = 'mailto:' + mail;
            this.title = 'email';
            $(this).text(mail);
    });
	
	
    /*$('#logo').hover(function(){          
      $.fn.soundPlay({url: 'http://alistraweb.project4u.cz/logo.mp3', playerId: 'embed_player', command: 'play'});
    });*/
	//$('.thirdMenu').hide();
	
});

$(function() {
    $('.hoverHelp').tipsy({
        gravity: 'w',
        html: true
    });
});

$(function() {
    $("#user").dialog({
     show: 'slide',
     width: 200,
     position: ['right','top']
    });
});

