 




//truesize(); 

//browser.display.focus_ring_width = 0 ;



  

$("#hmenu li, #umenu .m1-L, #umenu .m2-L, #umenu .m3-L,#umenu .m4-L , #cmenu .cmenu-L").hover(  function () 
			{
    		$(this).addClass("ov");
  			},
  			function () 
			{
    		$(this).removeClass("ov");
  			}
							);

function imgOn(obj) {

obj.className='xx_ov';

}

function chn(id)
{
document.getElementById(id).style.display = "block"; 
}

function imgOff(obj) {
	obj.className='xx';
}



function myinit()
	{
	//ieHover('div','xx');
	
	}

function truesize()
	{
		wnead=831;			
		w=$("html").width();
		pad=Math.round(minmax(0,(w-wnead)/2,300 ));
		//alert(w);
		if (!window.admin)
			{
			$("body").css("margin-right", pad).css("margin-left", pad).css("background-position", pad + "px top");
			//$("#footer").css("background-position", pad + "px top");
			
			} 
	}

function minmax(minval,val,maxval)
	{
		if (val<minval)
			{
				return minval;
			}
		else if ( val>maxval)
			{
				return maxval;
			}
		else 
			{
				return val;
			}
	}

$(document).ready(function()
	{
   		
		
		$('#adcont .color input').ColorPicker({
					onSubmit: function(hsb, hex, rgb, el) {
						$(el).val(hex);
						$(el).ColorPickerHide();
					},
					onBeforeShow: function () {
						$(this).ColorPickerSetColor(this.value);
					}
				})
				.bind('keyup', function(){
					$(this).ColorPickerSetColor(this.value);
				});
				
		//truesize();
		autoh=$(".autom").height();
		id=$("input[name='id']").val();
		
		
		
		$("#autoh").append("<img width='100' height='10' border='0' src='/myadmin.php?htb="+autoh+"&id="+id+"' >");
  		
		$("#center a.group").fancybox( 
							  {
		'hideOnContentClick': false
			}
			);
		//
		
		
		
		$(window).resize( function()
			{
				//truesize(); 
			});
	$("#center img.imgbox").each(function() 
		{


		var largePath = $(this).attr("src");
		
		largePath2=largePath.split("cont/img").join("cont/img/big");
		
		$(this).wrap("<a class='imgbig' href='" + largePath2 + "'></a>")
		
		});
		
		
		
	menuleft=$("#left").height();
	allcont=$("#container1").height();
	$(".imgbig").fancybox(
				{
				
				'imageScale':		false,
				'centerOnScroll': false 
				}
				);		
	
	
	$.get('automenu--'+allcont+'--'+menuleft, function(data)
				{
  				
				exp=data.split('[automenu]');  
				if (ie6)	
					{				
					$("#content").css("height",allcont );
					$("#inright").css("height", allcont);
					}
					
				$("#inright").append(exp[0]);
				$("#leftauto").append(exp[1]);
				
				
				});				
		
	});


  
 

  
  

 