function openVerMenu(mid){
	if($("#vsubmenu_"+mid).css("display")=="none"){
		$("#vsubmenu_"+mid).show(200);
		$("#vmenu_group_"+mid).css("background","#f1f4f0");
		saveOpenedMenu(mid,1);
	}else{
		$("#vsubmenu_"+mid).hide(200);
		$("#vmenu_group_"+mid).css("background","none");
		saveOpenedMenu(mid,0);
	}
}
function saveOpenedMenu(mid,stat){
	 $.ajax({
	   type: "get",
	   url: saveMenuScript,
	   data: "mid="+mid+"&stat="+stat,
	   success: function(msg){
		 void(0);
	   }
	 });
}

window.onload=function() {
	$('input[type=text][title!=""]').each(function() {
	if ($.trim($(this).val()) == '') $(this).val($(this).attr('title'));
	if ($(this).val() == $(this).attr('title')) $(this).addClass('exampleText');
	}).focus(switchText).blur(switchText);
	$("a.zoom").fancybox({
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
	$('.dev').hide();
	$('#dev0').show();
	showTopMenuSub();
}

function showTopMenuSub(){
	$('td.top_men_el').each(function(){
		var div = $($(this).children('div').children('ul'));
		$(this).bind("mouseenter",function(){
			div.show();	
			$(this).addClass('openMenu');
		}).bind("mouseleave",function(){
			div.hide();
			$(this).removeClass('openMenu');
		});
	});
	return false;
}

function switchText(){
	if ($(this).val() == $(this).attr('title'))
		$(this).val('').removeClass('exampleText');
	else if ($.trim($(this).val()) == '')
		$(this).addClass('exampleText').val($(this).attr('title'));
}

var devc=1;		
function dev(){
	$('.dev').hide();
	if(devc<cdev){$('#dev'+devc).show();devc++;
	}else{
		$('#dev0').show();
		devc=1;
	}
}
function formatText(index, panel) {
return index + "";
}

/*
  $(function () {
      $('.anythingSlider').anythingSlider({
          easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
//          easing: "fade",        // Anything other than "linear" or "swing" requires the easing plugin
          autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
          delay: 5000,                    // How long between slide transitions in AutoPlay mode
          startStopped: false,            // If autoPlay is on, this can force it to start stopped
          animationTime: 500,             // How long the slide transition takes
          hashTags: false,                 // Should links change the hashtag in the URL?
          buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
      		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
      		startText: "",             // Start text
	        stopText: "",               // Stop text
	        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
      });
      
  });*/
