$(document).ready(function(){
	
	// color menu toggle slide
	
	loc=window.location.toString();
	if (loc.search("#call")!=-1) {
	o=$(".otphone")[0];
	hs.htmlExpand( o, { objectType: 'iframe', outlineWhileAnimating: true, preserveContent: false, width: 400, height: 450,contentId: 'highslide-html', cacheAjax: false } );
	
	}
	
	
	$(".separ img").click(function(){
		if ($(".separ img")[0].src.search("_2")<0) {
			$(".separ img")[0].src="/i/butop_2.png";
		}
		else $(".separ img")[0].src="/i/butop.png";
		
		$("#cmenu1").slideToggle();
		
	});
	
	// main page works scroll
	
	$('.begun').draggable({ axis: 'x', containment: 'parent', drag: function(event, ui){ 
	
	pfx=this.id;
	
	d1=parseInt($("#"+pfx+"_line")[0].offsetWidth);
	d2=parseInt($("#"+pfx+"_zanlenta")[0].offsetWidth)+80;
	d3=parseInt($("#"+pfx+"_zanaveski")[0].offsetWidth);
	
	
	proc=parseInt(this.style.left)/d1;
	
	$("#"+pfx+"_zanlenta")[0].style.left=((-1*parseInt((d2-d3)*proc)))+"px";

	}});
	
	
	if ($("#blogAppear")[0]){
		
		$.get("/blog/list/"+$("#blogAppear")[0].innerHTML+".htm",
   function(data){

     $("#blogAppear")[0].innerHTML=data;
     $("#blogAppear").fadeIn("slow");
     
   });
		
	}
	$('.opspan').click(function(){
		$(this).parent().next().slideToggle();
	});
		
});


function fullExec(){

setTimeout(function(){

o=$("#zak2")[0];
parent.window.hs.htmlExpand( o, { objectType: 'iframe', outlineWhileAnimating: true, preserveContent: false, width: 800, height: 740, contentId: 'highslide-html', cacheAjax: false } );


}, 700);

}


