$(document).ready(function()
	{
	$(document).pngFix();

	$(function()
		{
		$('a[@rel*=lightbox]').lightBox(
			{
			overlayBgColor: '#000',
			overlayOpacity: 0.6,
			imageLoading: 'images/lightbox-ico-loading.gif',
			imageBtnClose: '../images/lightbox-btn-close.gif',
			imageBtnPrev: 'images/lightbox-btn-prev.gif',
			imageBtnNext: 'images/lightbox-btn-next.gif',
			containerResizeSpeed: 350,
			txtImage: 'Imaginea',
			txtOf: 'din'
			});
		});


	$(".dropmenu").dropmenu({topOffset: 26});

	if($(".row, .categorii, .produse").is("*"))
		{
		$(".row select.categorii").change(function()
			{
			categ = this;
			$.ajax({
				type: "GET",
				url: "functions/php2js.php?action=get_products&id="+($("option:selected",$(this)).val()),
				success: function(msg)
					{
					$("select.produse *",$(categ).parent().parent()).remove();
					$(msg).appendTo($(".cell:last select.produse",$(categ).parent().parent()));
					}
				});
			});
		}

	if($('.article_summary, .article_content, .eventcontainer>div').is("*"))
		{
		$('.article_summary, .article_content, .eventcontainer>div').each(function()
			{
			data = $(this).html();
			$(this).html('');
			data=data.replace(/&lt;/g,'<');
			data=data.replace(/&gt;/g,'>');
			$('<div>'+data+'</div>').appendTo(this);
			});
	
		articleHash=location.hash.substr(1);
		eventTag=$('a[name='+articleHash+']').parent();
		if($('.article_summary a',eventTag)[0])
			articleToggle($('.article_summary a',eventTag)[0]);
		}
	});
