$(document).ready(function() {

	
	
	$("#slider").easySlider({
		auto: true,
		continuous: true,
		numeric: true,
		pause: 6000,
	});

	
	$("#produseHome img[title]").tooltip('#demotip'); 
	 
	$("#pretInfo").addClass('noDisplay');
	
	$("#TrimiteMesaj").click(function(){
	  $("#pretInfo").slideToggle(100);
	});

	$("#cautaProdus").click(function() {
		$(this).val('');
	});
	
	// Initialise Facebox Modal window:
		
	//	$('a[rel*=modal]').facebox(); // Applies modal window to any link with attribute rel="modal"

	//$("img[rel]").overlay();
	
 	
	
	$('.pngfix').pngFix();
		
});
   function popup(url, name, width, height, scroll, modal, resizable) 
  {
	 	width=Math.min(screen.availWidth,width);
		height=Math.min(screen.availHeight-40,height);
	 	var poz_x=(screen.availWidth-width)/2;
		var poz_y=(screen.availHeight-height-30)/2;
	
	 	newwin=window.open(url, name, 'scrollbars='+scroll+', menubar=no, width='+width+', height='+height+', resizable=no,toolbar=no, left='+poz_x+', top='+poz_y+', location=no, status=no');
	
	 if(modal)
	 {
		popInt=setInterval(function(n)
		{
			if(typeof(newwin.name)=="string")
			{
				if(newwin.document.body)
				{
					openerfocus=function()
					{
	 					if(typeof(newwin.name)=="string")
						{
							newwin.focus();
						}
						else
						{
							document.body.onfocus=null;
						}
					}
					document.body.onfocus=openerfocus;
					newwin.window.document.body.onunload=function(){}
					newwin.focus();

					clearInterval(popInt);
				}
			}
			else
			{
				clearInterval(popInt)
			}
		 },1)
	 }
  } 
