function hide_id(nodeId)
{
    var node = document.getElementById(nodeId);
    if (node)
    {
        node.className=node.className.replace('showed', '');
        node.className += ' hidden';
    }
}

function show_id(nodeId)
{
    var node = document.getElementById(nodeId);
    if (node)
    {
        node.className=node.className.replace('hidden', '');
        node.className += ' showed';
    }
}

function toggle_id(nodeId)
{
    var node = document.getElementById(nodeId);
    if (node)
    {
        if (node.className.indexOf('hidden') != -1)
            node.className=node.className.replace('hidden', 'showed')
        else if (node.className.indexOf('showed') != -1)
            node.className=node.className.replace('showed', 'hidden')
        else node.className += ' showed';
     }
}

function setPrintCSS(isPrint) {
// By Akella cssing.org.ua
// Определяем поддержку нужного нам элемента в броузерах
  if (document.getElementsByTagName)
      x = document.getElementsByTagName('link');
  else
  {
      alert('Простите, этот скрипт не работает в вашем броузере');
      return;
  }
// Пробегая по всем элементам LINK в HTML  - включаем и отключаем нужные нам стили
// идентифицируя их по атрибуту title
// параметр isPrint - отвечает просто за вариант стилей для печти или монитора
  for (var i=0;i<x.length;i++) {
      if(x[i].title == 'printview'){x[i].disabled = !isPrint;}
      if(x[i].title == 'screenview'){x[i].disabled = isPrint;}
  }
}


var slider_photo_flag = true;
var fade_on =true;
$(document).ready(function(){
  $('#slider_portfolio').hover(function(){
    //$('.pagination',this).fadeIn();
    $('#prevnext',this).fadeIn();
  },function(){
    //$('.pagination',this).fadeOut();
    $('#prevnext',this).fadeOut();
  });
  $('#slider_photo').hover(function(){
    //$('.paging2',this).fadeIn();
    $('#prevnext2',this).fadeIn();
  },function(){
    //$('.paging2',this).fadeOut();
    $('#prevnext2',this).fadeOut();
  });
});
function slider_photo(flag){
  flag = flag || false;
  if(flag){
    $('#slider_photo').slideDown(200);
    $(".one_minute").css('display','none');
    $(".go_away").css('display','block');
    if(slider_photo_flag){
      $("#slider_photo").easySlider({
        auto:false,
        speed:500,
        pause:2000,
        continuous:true,
        prevnextId:"prevnext2",
        prevnext:true,
        nextId:"next",
        nextText:"",
        prevId:"prev",
        prevText:"",
        numericId:"paging2",
        numeric:true
      });
      slider_photo_flag = false;
    }
  }else{
    $('#slider_photo').slideUp(200);
    $(".go_away").css('display','none');
    $(".one_minute").css('display','block');
  }
}
function strToInt(s) {
  return isNaN(v = parseInt(s)) ? 0 : v;
}
function isSet(variable){


  return( typeof( variable ) != 'undefined' );
}


/* *********************************
        ON LOAD
********************************* */
window.onload = function(){
//	lightgallery.init();

}

