$(document).ready( function(){
    /*egyedi form kinézet*/
    $(".categorySelectContent textarea, .categorySelectContent select, .categorySelectContent input:text, .categorySelectContent input:checkbox, .categorySelectContent input:password, .categorySelectContent input:radio, .categorySelectContent input:file").uniform();
	$(".userGateContent textarea, .userGateContent select, .userGateContent input:text, .userGateContent input:checkbox, .userGateContent input:password, .userGateContent input:radio, .userGateContent input:file").uniform();

    /*szolgaltatasok listajanak animacioja*/
    $('.services #nav li').hover( function(){$(this).filter(':not(:animated)').animate({marginLeft:'10px'});},function(){$(this).animate({marginLeft:'0px'});});

    /*kategorialista*/
    $('.categorySelect').click(function(){
        $('.categorySelectContent').animate({left:'0px'},300);
    });

    $('#cancelButton,#filterButton').click(function(){
        $('.categorySelectContent').animate({left:'260px'},300);
    });

    /*ugyfelkapu animacioja*/
    $(".usergate").hover(
        //function(){$('.userGateContent2').css({'height':'300px'});$(this).filter(':not(:animated)').animate({ top: '-20px'},{ duration: 500, complete: function() {$("#email")/*.focus()*/;} }); }//,
        //function(){$(this).filter(':not(:animated)').animate({ top: '-150px'},{ duration: 500, complete: function() {$("#email").focusout();$('.userGateContent2').css({'height':'50px'});} }); }
    );
    

    $("h1#ize").click(
        function(){
            if(!flag)
            {
            	$('.userGateContent').css({'height':'200px'});
            	$(".usergate").filter(':not(:animated)')
            	.animate({ top: '-20px'},{ duration: 500, complete: function() {$("#email")/*.focus()*/;} }); 
            	flag=true;
            }
            else
            {
            	closeUserGate();
            }
	}).css({cursor: 'pointer'});


    $('.buble').mouseover(function(){
         $('.socialContent').html($(this).find('div.text').html());
         $('div.arrow').animate({'background-position': $(this).find('div.text').css('width')+' 0px'},300)
         //$('div.socialContent').animate({'margin-left': $(this).find('div.text').css('margin')},300)
    });
    
    
    //$()

})

var flag = false;
function closeUserGate()
{
	$('.usergate').filter(':not(:animated)')
	.animate({ top: '-150px'},{ duration: 500, complete: function() {
		$("#email").focusout();
		$('.userGateContent')
			.css({'height':'50px'});
		$('.userGateContent').css({'height':'40px'});
	} 
	}
	); 
	flag=false;
}
