	/* beautiful inputs */
	$(document).ready
	(
		function() 
		{		
			$('.smart_input').addClass("idleField");
			$('.smart_input').focus
			(
				function() 
				{
					$(this).removeClass("idleField").addClass("focusField");
					if (this.value == this.defaultValue)
					{ 
						this.value = '';
					}
					if(this.value != this.defaultValue)
					{
						this.select();
					}
				}
			);
			$('.smart_input').blur
			(
				function() 
				{
					$(this).removeClass("focusField").addClass("idleField");
					if ($.trim(this.value) == '')
					{
						this.value = (this.defaultValue ? this.defaultValue : '');
					}
				}
			);
		}
	);
	/* /beautiful inputs */
	
	/* anchors */
	anchor = 
	{
		init : 
		function()  
		{
			$("a.anchorLink").click
			(
				function () 
				{	
					elementClick = $(this).attr("href");
					destination = $(elementClick).offset().top;
					$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, 1100 );
					return false;
				}
			)
		}
	};

	$(document).ready
	(
		function() 
		{
			anchor.init();
		}
	);
	/* /anchors */
	
	/* fancy box */
	$(document).ready
	(
		function() 
		{
			$(".fancyboxs a").fancybox();
		}
	);
	/* /fancy box */
	
	/* preload all page */
	function PreLoad()
	{}
	/* /preload all page */
	
	/* coda-slider */
	jQuery(window).bind
	(
		"load", 
		function() 
		{
			jQuery(".coda_sliders").codaSlider();
		}
	);
	/* /coda-slider */
	function DoSearch()
	{
		var q = Trim(gE("q").value);
		var words = q.split(' ');
		
		q = encodeURI(q);
		
		if (words.length > 1)	
			q = q.replace("%20", "+");
		else
			q = q.replace("+", "");
			
		window.location = "/"+LANG+"/search.php?q=" + q;
	}
	
	function CheckSearchWord()
	{
		
		var q = Trim(gE("q").value);
			
		if (q.length < 3 || q=="Search")
		{
			alert("Search query should contain more than 3 symbols");
			return false;
		}
		DoSearch();
		return false;
	}
	
	// Making default TEXT for Input
	$(document).ready(function()
	{
		$("#q").focus(function(srcc)
		{
			if ($(this).val() == $(this)[0].title)
			{
				$(this).removeClass("defaultTextSearch");
				$(this).val("");
			}
		});
		
		$("#q").blur(function()
		{
			if ($(this).val() == "")
			{
				$(this).addClass("defaultTextSearch");
				$(this).val($(this)[0].title);
			}
		});
		
	$(".defaultText").blur();        
	});