ob_var=null;

$(function()
{
    $("#divsw").sideswap({ previous: '', next: '', display_time: 10000, transition_speed: 300 });
});

function popup_presents(obj, str)
{
    $.stopTimer();
    if (obj.parentNode.className != "acts")
	{
	    navRoot = document.getElementById("swich_m");
	    for (i=0; i<navRoot.childNodes.length; i++)
	    {
		    node = navRoot.childNodes[i];
		    if (node.nodeName=="LI")
		    {
		    	node.className=node.className.replace("acts", "");
    		}
	    }
	    obj.parentNode.className="acts";

	    divRoot = document.getElementById("divsw");
	    for (i=0; i<divRoot.childNodes.length; i++)
	    {
		    node = divRoot.childNodes[i];
		    if (node.nodeName == "DIV")
		    {
		    	node.style.display='none';
    		}
	    }
	    document.getElementById(str).style.display='block';
	}
}

function onMouseOut(obj, str)
{
    $.startTimer();
}
$(function() {
        $.nyroModalSettings({
            ajax: { cache: false },
            windowResize: false,
            modal: false,
            height: 520,
            width: 920,
            minWidth: 920,
            minHeight: 520,
            resizable: true,
            autoSizable: true,
            hideContent: hideContent,
            bgColor: '#ffffff',
            cache: false
        });
        function hideContent(elts, settings, callback) {
  lState=0;
  $.startTimer();
 elts.contentWrapper
 .animate({
     height: '50px',
     width: '50px',
     marginTop: (-(25 + settings.borderH) / 1 + settings.marginScrollTop) + 'px',
     marginLeft: (-(25 + settings.borderW) / 1 + settings.marginScrollLeft) + 'px'
 }, { duration: 0, complete: function() {
     elts.contentWrapper.hide();
     callback();
 }
 });
        }
    });
var lState=0;
function onLClick(hr)
{
  lState=1;
  $.stopTimer();
  $(hr).nyroModalManual();
  return false;
}
function onLMouseOut()
{
  if(!lState) $.startTimer();
}
function onLMouseOver()
{
  if(lState)lState=0;
  $.stopTimer();
}
