// JavaScript Document

jq(function() {
	jq("div.pos-button a span > span").replaceWith("<span>скачать</span>");
	jq("a[rel=themes]").fancybox({
		"opacity": false,
		"speedIn": 1000,
		"speedOut": 1000,
		"overlayOpacity": 0.7,
		"width":640,
		"height":480,
		"easingIn":"swing",
		"easingOut": "swing",
	});
	// убрать внизу ссылку 
	jq('#ckpoweredby, #easyfooter').remove();
	
	jq('p.ck_mandatory:first').css({
		'position':'relative',
		'top':'13px'
	});
	// Гостевая книга, ширина поля select 
	jq('#easybook select').attr({
		style: "width:248px;" 
		});
	// Сообщение в гостевой книге
	jq("#easybook b:first").prepend("Уважаемые посетители сайта. Все темы были протестированны на Windows XP Service Pack 3. Если тема устанавливается не полностью, а только отдельные элементы, например, обои и курсор - попробуйте установить патч UXTheme Multi-Patcher.<br><br>");
	jq(".easy_frame:first").css({"margin-top": "100px"});
	
	
});


// Scroll до подвала сайта
  jq(function() {
	jq('a.button:first').bind('click',function(event){
        jq('html, body').stop().animate({
        	scrollTop: "4000px",
      	}, 1500);
        event.preventDefault();
  	});
});

// Функционал кнопки подробнее
 jq(function() {
	jq('a.button:gt(0)').css({"margin-left":"476px", "margin-top":"10px"}); 
	jq('a.button:gt(0)').toggle(
	function(){
		jq(this).text("Скрыть");
		jq(this).siblings("div.hide").slideDown(400);
	},
	function(){
		jq(this).text("Подробнее");
		jq(this).siblings("div.hide").slideUp(400);
	});
	
 });
 
 // Добавить в избранное
 
 function bookmark2 (a) {
	if (window.opera && window.print) {
	var mbm = a;
	mbm.setAttribute("rel", "sidebar");
	mbm.setAttribute("title", document.title);
	mbm.setAttribute("href", window.location.href);
	mbm.click();
	}
	else if (window.sidebar) {
	window.sidebar.addPanel(document.title, window.location.href, "");
	}
	else if (window.external) {
	window.external.AddFavorite(window.location.href, document.title);
	}
	}

