 
    jQuery(document).ready(function($) {

     $('#zpr_heslo').click(function(){ 
      $('#zpr_heslo').attr("value",""); }); 
     
     
     $('#twetit').click(function(){
     	if($('#tweetarea').attr("value")){

      $('#twetit').css({
        'background-image': 'url(http://blog.bdc.cz/wp-content/plugins/kagjutwitter/load.gif)',
      });

      $('#ajadiv').load('http://blog.bdc.cz/trojak/?zpravicky', { akce: 'uloz', text: $('#tweetarea').attr("value"), zpr_heslo: $('#zpr_heslo').attr("value") }, function(){
             $('#twetit').css({
        'background-image': 'url(http://blog.bdc.cz/wp-content/plugins/kagjutwitter/tweet_btn_bg.png)',
      });      
          });
  } else { alert('jea');}
  
  }); 
      
      
    })
function checkForm(){
		if(inputUser.attr("value") && inputMessage.attr("value"))
			return true;
		else
			return false;
	}

$(document).ready(function() {	

	//select all the a tag with name equal to modal
	$('a[name=modal]').click(function() {

		//Get the A tag
		var id = $(this).attr('title');
	
		//Get the screen height and width
		var maskHeight = $(document).height();
		var maskWidth = $(window).width();
	
		//Set heigth and width to mask to fill up the whole screen
		$('#mask').css({'width':maskWidth,'height':maskHeight});
		
		//transition effect		
		$('#mask').fadeIn(1000);	
		$('#mask').fadeTo("slow",0.8);	
	
		//Get the window height and width
		var winH = $(window).height();
		var winW = $(window).width();
              
		//Set the popup window to center
		$(id).css('top',  winH/2-$(id).height()/3);
		$(id).css('left', winW/2-$(id).width()/2);
	
		//transition effect
		$(id).fadeIn(2000); 
	
	});
	
	//if close button is clicked
	$('.window .close').click(function () {
		$('#mask, .window').hide();
	});		
	
	//if mask is clicked
	$('#mask').click(function () {
		$(this).hide();
		$('.window').hide();
	});			
	
});
