			$(document).ready(function(){
				//Examples of how to assign the ColorBox event to elements
				$("a[rel='colorbox']").colorbox();
				$(".colorbox-video").colorbox({iframe:true, innerWidth:425, innerHeight:344}); 
				//Example of preserving a JavaScript event for inline calls.
				$("#click").click(function(){ 
					$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});												
				
				$('#domain_status').hide();
				$('#domain_search').click(function() {					
					$('#domain_status').html('<img src="images/ajax-loader.gif">');					
					var url = $('#domain_query').val();					
					$.get('api/whois.php?domain='+url+'', function(raspuns){
						$('#domain_status').html('<h2>'+raspuns+'</h2>');						
						$('#domain_status').show();					
						//$('#recomandari').html('<a href="domain.php?check='+url+'" id="recomandari"><img alt="" src="images/header-search-button.jpg"></a>');					
					});				
				});
				
				// domain.php?check='+$('#domain_query').val()+'
				
				$('#recomandari').click(function() {					
					var url = $('#domain_query').val();					
					var urlLenght = url.length;
					
					if (urlLenght < 4)
					{
						alert('Specifica un domeniu');
					}
					else
					{
						window.location = 'domenii.php?check='+url+'';
					}
					
				});
								
			});

