// JavaScript Document

//<![CDATA[
	   
		   
$(function () {
    var tabContainers = $('div.tabs > div'); // получаем массив контейнеров
    tabContainers.hide().filter(':first').show(); // прячем все, кроме первого
    // далее обрабатывается клик по вкладке
    $('div.tabs span.tab a').click(function () {
        tabContainers.hide(); // прячем все табы
        tabContainers.filter(this.hash).show(); // показываем содержимое текущего
        $('div.tabs span.tab a').removeClass('active'); // у всех убираем класс 'selected'
        $(this).addClass('active'); // текушей вкладке добавляем класс 'selected'
        return false;
    }).filter(':first').click();
	
	 
	
	
});

function showword(inp,word){
	if ($('#'+inp).val()=='') {$('#'+inp).val(word);}
}

function hideword(inp,word){
	if ($('#'+inp).val()==word) {$('#'+inp).val('');}
}

function addBookmark(url, title)
{
  if (!url) url = location.href;
  if (!title) title = document.title;
  
  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, "");
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;
  
  return true;
}


function showimblock() {
	$('#imblock1').css('display','block');
	$('#imblock2').css('display','block');
	}			

function hideimblock() {
	$('#imblock1').css('display','none');
	$('#imblock2').css('display','none');
	}	

$(function () {
   // initialize scrollable  
    $("div.scrollable").scrollable({ 
        autoscroll: false,     
        // items are auto-scrolled in 2 secnod interval 
        interval: 0, 
         
        // when last item is encountered go back to first item 
		size: 1,
        loop: false,
		clickable: false,
		hoverClass:	null,
		easing: "swing",
        
        // make animation a little slower than the default 
        speed: 500 
         
        // when seek starts make items little transparent 
        /*onBeforeSeek: function() { 
            this.getItems().fadeTo(600, 0.2);         
        },*/ 
         
        // when seek ends resume items to full transparency 
        /*onSeek: function() { 
            this.getItems().fadeTo(600, 1); 
        } */
    });
	
	$("div.soscroll").scrollable({ 
        autoscroll: false,     
        // items are auto-scrolled in 2 secnod interval 
        interval: 0,
		vertical:true,
         
        // when last item is encountered go back to first item 
		size: 1,
        loop: false,
		clickable: false,
		hoverClass:	null,
		easing: "swing",
        
        // make animation a little slower than the default 
        speed: 500 
         
        // when seek starts make items little transparent 
        /*onBeforeSeek: function() { 
            this.getItems().fadeTo(600, 0.2);         
        },*/ 
         
        // when seek ends resume items to full transparency 
        /*onSeek: function() { 
            this.getItems().fadeTo(600, 1); 
        } */
    }); 
});

tinyMCE.init(
{
	mode : "textareas",
	theme : "simple",
	editor_selector : "mceEditor",
	editor_deselector : "mceNoEditor",
	width: "400px",
	theme_simple_resizing : true
}
);

//]]>


