function preload(images) {
	if (typeof document.body == "undefined") return;
	try {
		var div = document.createElement("div");
		var s = div.style;
		s.position = "absolute";
		s.top = s.left = 0;
		s.visibility = "hidden";
		document.body.appendChild(div);
		div.innerHTML = "<img src=\"" + images.join("\" /><img src=\"") + "\" />";
	} catch(e) {
		// Error. Do nothing.
	}
}

$(function() {

	
	
	// Контакты
	$("#address-panel LI A").click(
		function(){
			$("#address-panel DL DT").hide();
			$("#address-panel DL DD").hide();
			$("#address-panel LI A").removeClass("current");
			$(this).addClass("current");
		
			if($("#address-panel A.address-spb").is(".current")){
				$("#address-panel .spb").show();
			}

			if($("#address-panel A.address-msk").is(".current")){
				$("#address-panel .msk").show();
			}

			if($("#address-panel A.address-chr").is(".current")){
				$("#address-panel .chr").show();
			}

			if($("#address-panel A.address-vlg").is(".current")){
				$("#address-panel .vlg").show();
			}
		}
	);
	$("#address-panel LI:first-child A").trigger("click");
	
	$(".nobg a").click(function(){
		$(this).hide();
		$("tr.none").toggle();
	});
	
	// Продвижение сайтов, Сопровождение сайтов, Обслуживание сайтов, Поддержка сайтов, Администрирование сайтов, Наполнение сайтов, Раскрутка сайтов, Контекстная реклама, Копирайтинг
	$("#seo-table .help").tooltip({
		tipClass: 'tooltip',
		effect: 'slide',
		fadeOutSpeed: 50,
		predelay: 50,
		position: "top left",
		offset: [-10, 190]
	});

		
	// Создание сайтов, Разработка сайтов
	/*$("#presentation-panel .b-tabs").tabs("div.panes > div",{tabs:'A', history: true});
	$(".tabs LI").bind('click',
		function(){
			$(".tabs li").removeClass('prev-current');
			$(this).prev('LI').addClass('prev-current');
		}
	);
	$('.tabs .current').parent('LI').prev('LI').addClass('prev-current');*/
	
		// Виды сайтов со сдвоенными панелями
	/*$(".b-tabs-primary").tabs('> .pane', {tabs:'a', history: true});

	$(".tabs").tabs('.panp', {tabs:'a', history: true } );*/
	
	$(".tabs").tabs('.panp', {tabs:'a', history: true } );
	$(".tabs LI").bind('click',
		function(){
			$(".tabs li").removeClass('prev-current');
			$(this).prev('LI').addClass('prev-current');
		}
	);
	$('.tabs .current').parent('LI').prev('LI').addClass('prev-current');
	
	
	
	//$(".b-tabs-secondary").tabs('> .pane', {tabs:'a'});
	
	// Общий
	preload(['/i/bg-dropdown.png']);
	
	$('.question').tabs(".question .panel", {tabs: 'H5', effect: 'slide', initialIndex: 0});
	
	$('<ul><li class="next nav"><a href="javascript:;">Вперед</a></li><li class="prev nav"><a href="javascript:;">Назад</a></li></ul>').appendTo('#main-portfolio-nav');
	
	$('#main-portfolio').scrollable({
		circular	:	1,
		next	:	"#main-portfolio-nav .next",
		prev	:	"#main-portfolio-nav .prev"
	});
	
	$('#sidebar-portfolio').scrollable({
			circular: true,
			prev	:	".portfolio-nav .next",
			next	:	".portfolio-nav .prev"
		}).navigator({
			navi: ".portfolio-nav SPAN",
			naviItem: 'A',
			activeClass: 'current'
		});
	
	$('#main-content').append('<ul id="main-review-nav"><li class="next nav"><a href="javascript:;">Вперед</a></li><li class="prev nav"><a href="javascript:;">Назад</a></li></ul>');
	
	$('#review').scrollable({
		circular	:	1,
		next	:	"#main-review-nav .next",
		prev	:	"#main-review-nav .prev"
	});


	$("#portfolio-slider .item:first-child IMG").attr("src",function(){
		return	$(this).attr('data-src');
	});

	$("#portfolio-slider .scrollable").scrollable({
		//circular: true,
		prev	:	".portfolio-nav .next",
		next	:	".portfolio-nav .prev",
		onSeek: function() {
			$("#portfolio-slider .scrollable .item").eq(this.getIndex()).find('img').attr("src",function(){
				return	$(this).attr('data-src');
			});
		}
	}).navigator({
		navi: ".portfolio-nav SPAN",
		naviItem: 'A',
		activeClass: 'current'
	});
	
	$("#text-slider").scrollable({
		vertical: true
	}).navigator({
		navi: "#secondary-text-menu",
		naviItem: 'LI',
		activeClass: 'current'
		});

	
	$('.portfolio-nav SPAN').each(
			function(){
				$(this).children('A').each(
					function(index){
						$(this).text(index + 1);
					}
				);
			}
		);
	
	$("#main-portfolio .item").fancybox({
		'padding'	: 25,
		'overlayOpacity' : 0.8,
		'overlayColor' : '#7690aa',
		'autoScale' : false,
		'width': 619,
		'height': 559,
		'autoDimensions':false,
		'cyclic' : true,
		'titleFormat' : function(title){
			return '<b class="fancy-title-box"><a target="_blank" href="http://'+title+'">' + title + '</a></b>';
		}
	});
	
	$("#sidebar-portfolio .item").fancybox({
		'padding'	: 25,
		'overlayOpacity' : 0.8,
		'overlayColor' : '#7690aa',
		'autoScale' : false,
		'width': 619,
		'height': 559,
		'autoDimensions':false,
		'cyclic' : true,
		'titleFormat' : function(title){
			return '<b class="fancy-title-box"><a target="_blank" href="http://'+title+'">' + title + '</a></b>';
		}
	});

	$('.napolnenie-stranic').add($('.napolnenie-stranic').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		scrolling : 'no',
		showNavArrows : false,
		href : '/opcii-napolnenie-stranic/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 495,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	
	$('.gotovyj-dizajn').add($('.gotovyj-dizajn').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		scrolling : 'no',
		showNavArrows : false,
		href : '/opcii-gotovyj-dizajn/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 495,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});	
	
	$('.individualnyj-dizajn').add($('.individualnyj-dizajn').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-individualnyj-dizajn/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 555,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.dizajn-maket').add($('.dizajn-maket').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-dizajn-maket/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 555,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.fotogalereya').add($('.fotogalereya').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-fotogalereya/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 440,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.mail-box').add($('.mail-box').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-mail-box/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 280,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.sistema-upravleniya-sajtom').add($('.sistema-upravleniya-sajtom').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-sistema-upravleniya-sajtom/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 480,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.domen-i-xosting').add($('.domen-i-xosting').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-domen-i-xosting/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 430,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.statistika-poseshhaemosti').add($('.statistika-poseshhaemosti').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-statistika-poseshhaemosti/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 570,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.forma-obratnoj-svyazi').add($('.forma-obratnoj-svyazi').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-forma-obratnoj-svyazi/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 450,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.novosti-sajta').add($('.novosti-sajta').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-novosti-sajta/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 410,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.poisk-po-sajtu').add($('.poisk-po-sajtu').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-poisk-po-sajtu/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 495,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.profili-polzovatelej').add($('.profili-polzovatelej').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-profili-polzovatelej/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 400,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.registraciya-v-poiskovyx-sistemax').add($('.registraciya-v-poiskovyx-sistemax').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-registraciya-v-poiskovyx-sistemax/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 300,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.katalog-tovarov').add($('.katalog-tovarov').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-katalog-tovarov/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 300,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.karta-proezda').add($('.karta-proezda').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-karta-proezda/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 300,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.vote').add($('.vote').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-vote/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 310,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.funkcional-internet-magazina').add($('.funkcional-internet-magazina').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-funkcional-internet-magazina/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 550,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('.skidka-5').add($('.skidka-5').parent('TH')).fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'href' : '/opcii-skidka-5/',
		'type' : 'iframe',
		'width' : 500,
		'height' : 550,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	$('#saling #order A,#saling2 .order2,.block_site_zakaz A,.cms-test,.btn-order-now, .btn-order-adw').fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'type' : 'iframe',
		'width' : 575,
		'height' : 300,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	
	$('#review A').fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		scrolling : 'no',
		autoScale : false,
		showNavArrows : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	
	$("TFOOT .order").fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		scrolling : 'no',
		showNavArrows : false,
		'type' : 'iframe',
		'width' : 285,
		'height' : 360,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});

	$('#to-untimely-form').fancybox({
		padding	: 25,
		overlayOpacity : 0.8,
		overlayColor : '#7690aa',
		autoScale : false,
		showNavArrows : false,
		scrolling : 'no',
		'type' : 'iframe',
		'width' : 280,
		'height' : 310,
		'autoScale' : false,
		titleFormat : function(title){
			return '<b class="fancy-title-box">' + title + '</b>';
		}
	});
	
	
	$("#presentation-panel TBODY TH:first-child").addClass("first");
	
	$("#presentation-panel TBODY TD:last-child").addClass("last");
	
	$("#presentation-panel TR:odd,.post-text TR:odd").addClass("odd");
	
	$(".present-panel").wrapInner('<div class="present-panel-content"></div>');
	$(".present-panel").prepend('<div class="present-panel-top"></div>');
	$(".present-panel").append('<div class="present-panel-bottom"></div>');
	
	$("#feedback2").wrapInner('<div class="feedback2-content"></div>');
	$("#feedback2").prepend('<div class="feedback2-top"></div>');
	$("#feedback2").append('<div class="feedback2-bottom"></div>');

	$("#ya").click(
		function(){
			$("#feedback .hidden").css({display:'block'});
		}
	);
	$("#vi").click(
		function(){
			$("#feedback .hidden").css({display:'none'});
		}
	);
	
	$("blockquote").wrapInner('<div class="blockquote-content"></div>');
	$("blockquote").prepend('<div class="blockquote-top"><div></div></div>');
	$("blockquote").append('<div class="blockquote-bottom"><div></div></div>');	
	
	$("#brief").wrapInner('<div class="brief-content"></div>');
	$("#brief").prepend('<div class="brief-top"><div></div></div>');
	$("#brief").append('<div class="brief-bottom"><div></div></div>');
	
	$('#ip').hide();
	$('#hidden-ip').hide();
	$('#hidden-ip').val($('#ip').text());
	
	$('#ip2').hide();
	$('#hidden-ip2').hide();
	$('#hidden-ip2').val($('#ip2').text());
	
	$("#artlinks UL").hide();

	$("#artlinks .ar-slide-title").click(
		function(){
			$(this).toggleClass('active').next('UL').slideToggle();
		}
	);


	
(function($){$.fn.filestyle=function(options){var settings={width:250};if(options){$.extend(settings,options);};return this.each(function(){var self=this;var wrapper=$("<div>").css({"width":settings.imagewidth+"px","padding":"0 0 0 3px","height":settings.imageheight+"px","background":"url("+settings.image+") 0 0 no-repeat","background-position":"right","display":"inline","position":"absolute","overflow":"hidden"});var filename=$('<input class="file">').addClass($(self).attr("class")).css({"display":"inline","width":settings.width+"px"});$(self).before(filename);$(self).wrap(wrapper);$(self).css({"position":"relative","height":settings.imageheight+"px","width":settings.width+"px","display":"inline","cursor":"pointer","opacity":"0.0"});if($.browser.mozilla){if(/Win/.test(navigator.platform)){$(self).css("margin-left","-142px");}else{$(self).css("margin-left","-168px");};}else{$(self).css("margin-left",settings.imagewidth-settings.width+"px");};$(self).bind("change",function(){filename.val($(self).val());});});};})(jQuery);
$("input[type=file]").filestyle({ 
     image: "/wp-content/themes/t/i/bg-fileinput-button.png",
     imageheight : 24,
     imagewidth : 30,
     width : 143
 });
 
	$('body').not('#loadbox').append('<p id="addBookmarkContainer"></p>');
	
	$("#addBookmarkContainer").bind('click', function() {
		window.location.hash = '#z'
		$('.sm').show();
		$('.nm').hide();
	});

});


/*! 
*  Copyright 2006-2011 Dynamic Site Solutions.
*  Free use of this script is permitted for non-commercial applications,
*  subject to the requirement that this comment block be kept and not be
*  altered.  The data and executable parts of the script may be changed
*  as needed.  Dynamic Site Solutions makes no warranty regarding fitness
*  of use or correct function of the script.  Terms for use of this script
*  in commercial applications may be negotiated; for this, or for other
*  questions, contact "license-info@dynamicsitesolutions.com".
*
*  Script by: Dynamic Site Solutions -- http://www.dynamicsitesolutions.com/
*  Last Updated: 2011-03-09
*/

//IE5+/Win, Firefox, Netscape 6+, Opera 7+, Safari, Google Chrome for Windows,
// Konqueror 3, IE5/Mac, iCab 3

var isMSIE=/*@cc_on!@*/false; // http://dean.edwards.name/weblog/2007/03/sniff/
var isIEmac=false; /*@cc_on @if(@_jscript&&!(@_win32||@_win16)&& 
(@_jscript_version<5.5)) isIEmac=true; @end @*/
var undefined;

function isEmpty(s){return ((s=='')||/^\s*$/.test(s));}

var addBookmarkObj = {
  linkText:'Добавить в закладки',
  title:"Создание сайтов — студия «Сайт для Вас»",
  URL:location.href,
  addTextLink:function(parId){
    if(addBookmarkObj.checkMobileDevice()) return;
    var a=addBookmarkObj.makeLink(parId,1);
    if(a){
      jQuery(a).text(addBookmarkObj.linkText);
      return;
    }
    var cont=addBookmarkObj.getParent(parId);
    if(!cont) return;
    jQuery(cont).append('<span>'+addBookmarkObj.findKeys()+'</span>');
  },
  addImageLink:function(parId,imgPath){
    if(!imgPath || isEmpty(imgPath)) return;
    if(addBookmarkObj.checkMobileDevice()) return;
    var o=addBookmarkObj,a=o.makeLink(parId),img=document.createElement('img');
    img.title=img.alt=o.modal?o.linkText:o.findKeys();
    img.src=imgPath;
    a.appendChild(img);
  },
  makeLink:function(parId,isText){
    var cont=addBookmarkObj.getParent(parId);
    if(!cont) return null;
    var a=document.createElement('a');
    a.href=addBookmarkObj.URL;
    var s=document.createElement('div').style;
    var isFx35plus=((navigator.userAgent.toLowerCase().indexOf('firefox')!=-1)
      && (s.wordWrap!==undefined) && (s.MozTransform!==undefined));
    if(window.external && isMSIE && !isIEmac){
      // IE4/Win generates an error when you
      // execute 'typeof(window.external.AddFavorite)'
      // In IE7 the page must be from a web server, not directly from a local 
      // file system, otherwise, you will get a permission denied error.
      // Maxthon shows 'typeof(window.external.AddFavorite)' as 'undefined'
      // even though it is defined.
      a.onclick=function(){ // IE/Win
        try {
          window.external.AddFavorite(addBookmarkObj.URL,addBookmarkObj.title);
        } catch(ex){
          addBookmarkObj.displayMsg(addBookmarkObj.findKeys());
        }
		
        return false;
      }
      addBookmarkObj.modal=1;
    } else if(window.opera || isFx35plus){ // Opera 7+, Firefox 3.5+
      a.title=addBookmarkObj.title,a.rel='sidebar';
      addBookmarkObj.modal=1;

    } else if(isText) {
      return null;
    } else {
      a.onclick=function(){
        addBookmarkObj.displayMsg(this.firstChild.title);

        return false;
      }
    }
    return cont.appendChild(a);
  },
  displayMsg:function(t){
  	alert('After closing this dialog, '+t.charAt(0).toLowerCase()+t.slice(1));
  },
  getParent:function(parId){
    if(!document.getElementById || !document.createTextNode) return null;
    parId=((typeof(parId)=='string')&&!isEmpty(parId))
      ?parId:'addBookmarkContainer';
    return document.getElementById(parId)||null;
  },
  findKeys:function(){
    // user agent sniffing is bad in general, but this is one of the times 
    // when it's really necessary
    var ua=navigator.userAgent.toLowerCase(),Webkit=(ua.indexOf('webkit')!=-1),
      Mac=/mac(\s*os|intosh|.*p(ower)?pc)/.test(ua),
      str=(Mac?'Command/Cmd':'CTRL');
    if(window.opera && (!opera.version || (opera.version()<9))) {
      str+=' + T';  // Opera versions before 9
    } else if(ua.indexOf('konqueror')!=-1) {
      str+=' + B'; // Konqueror
    } else if(window.opera || window.home || Webkit || isMSIE || Mac) {
      // IE, Firefox, Netscape, Safari, Google Chrome, Opera 9+, iCab, IE5/Mac
      str+=' + D';
    }
    return ((str)?'<a class="nm">Добавить в закладки</a> <span class="sm">Нажмите '+str+' чтобы добавить эту страницу в закладки.</span>':str);
  },
  checkMobileDevice:function(){
    var r='iphone|ipod|android|palm|symbian|windows ce|windows phone|iemobile|'+
    'blackberry|smartphone|netfront|opera m|htc[-_].*opera';
    return (new RegExp(r)).test(navigator.userAgent.toLowerCase());
  }

}


jQuery(document).ready(addBookmarkObj.addTextLink);
