function inputClear(hInput,sString){

	if (hInput.value == sString) {
		hInput.value = '';
		hInput.style.color = 'black';
	} else if (hInput.value == '') {
		hInput.value = sString;
		hInput.style.color = 'gray';
	}
		
}


function getRandomQuote() 
{
	iCategoryId = 0;
	var divContentQuote = jQuery("#quotesAll div.quotesContent");
	jQuery.ajax({  
		method: "post",
		global: false,
		url: "ajax/getRandomQuote.php",data: "&random=" + Math.random(),  
//			beforeSend: function(){jQuery(divContent).show("fast");}, //show loading just when link is clicked  
			beforeSend: function(){jQuery(divContentQuote).html('Ładowanie...');}, //show loading just when link is clicked  
//			complete: function(){ jQuery("#loading").hide("fast");}, //stop showing loading when the process is complete  
		success: function(html){ //so, if data is retrieved, store it in html  
//				jQuery(".content").show("slow"); //animation  
			jQuery(divContentQuote).html(html); //show the html inside .content div  
//			var iGetRandomQuoteInterval = setInterval("getRandomQuote()",30000);
//				showHidePreloader(true);
		}  
	}); //close jQuery.ajax(  
}

function getRandomGallery() 
{
	iCategoryId = 1;
	var divContentRGallery = jQuery("#RandomGallery");
	jQuery.ajax({  
		method: "post",
		global: false,
		url: "ajax/getRandomGallery.php",data: "&random=" + Math.random(),  
//			beforeSend: function(){jQuery(divContent).show("fast");}, //show loading just when link is clicked  
			beforeSend: function(){jQuery(divContentRGallery).html('Ładowanie...');}, //show loading just when link is clicked  
//			complete: function(){ jQuery("#loading").hide("fast");}, //stop showing loading when the process is complete  
		success: function(html){ //so, if data is retrieved, store it in html  
//				jQuery(".content").show("slow"); //animation  
			jQuery(divContentRGallery).html(html); //show the html inside .content div  
//			var iGetRandomGalleryInterval = setTimeout("getRandomGallery()",25000);
//				showHidePreloader(true);
		}  
	}); //close jQuery.ajax(  
}

function initializeFancyBoxImages()
{
	jQuery("a.fancyBoxImage").fancybox({
		'zoomSpeedIn':	500, 
		'zoomSpeedOut':	300, 
		'overlayShow':	true
	});
}


function toggleLyrics(iId) 
{
	var divLyricsDesc = jQuery("#lyricsDesc_" + iId);
	var bOff = (jQuery(divLyricsDesc).css("display") == 'none') ? true : false;
	divLyricsDesc.toggle();
	if (bOff) {
		var hrefToHide = jQuery("#showLyricsHref_" + iId);
		var hrefToShow = jQuery("#hideLyricsHref_" + iId);
	} else {
		var hrefToHide = jQuery("#hideLyricsHref_" + iId);
		var hrefToShow = jQuery("#showLyricsHref_" + iId);
	}
	hrefToHide.hide();
	hrefToShow.show();
	
	
}

