$(document).ready(function(){	//hislide для всех рисунков	$('.content img').each(function(){		path = $(this).attr('src');		if(path.indexOf('preview')+1) {			href = path.replace('/preview/','/');			$(this).wrap('<a href="'+href+'" onclick="return hs.expand(this)"></a>');		}	})	//баннеры	$('.banner_list a').hover(		function(){			img = $(this).find('img')			alt = img.attr('alt');			src = img.attr('src');			img.attr('alt',src).attr('src',alt);		},		function(){			img = $(this).find('img')			alt = img.attr('alt');			src = img.attr('src');			img.attr('alt',src).attr('src',alt);		}	);	$('.box_click').click(function(){		$(this).parent('div').find('.box_text').slideToggle('fast');	});	//всплывающее меню	ul = $('.page_list .a').parent('li').parent('ul');	if (ul.css('display')=='none') {		ul.show().addClass('active');		ul = ul.parent('li').parent('ul');		if (ul.css('display')=='none') ul.show().addClass('active');	}	ul = $('.page_list .a').parent('li').find('ul');	if (ul.css('display')=='none') {		ul.show().addClass('active');	}	$('.page_list li a').click(function () {		parent = $(this).parent('li').parent('ul');		ul = $(this).parent('li').children('ul');		if (ul.length>0) {			if (ul.hasClass('active')) {				ul.slideToggle('fast').removeClass('active');			}			else {				parent.children('li').children('ul.active').slideToggle('fast').removeClass('active');				ul.slideToggle('fast').addClass('active');			}			return false;		}	});	//всплывающее меню	$('ul.menu_list li ').hover(		function () {			$(this).children('ul').stop(true, true).slideToggle('fast');			$(this).find('a:first').addClass('a');			$(this).find('ul li a:last').addClass('last');		},		function () {			$(this).children('ul').stop(true, true).slideToggle('fast');			$(this).find('a').removeClass('a');		}	);	//последний элемент в меню	if ($('ul.menu_list > li:last').css('width').replace(/[^0-9]/g,'')>0) {		width = $('ul.menu_list > li:last').css('width').replace(/[^0-9]/g,'')-$('ul.menu_list ul:last').css('width').replace(/[^0-9]/g,'');		$('ul.menu_list > li:last').find('ul').css('left',width+'px');	}	//highslide	hs.graphicsDir = '/highslide/graphics/';	hs.align = 'center';	hs.transitions = ['expand', 'crossfade'];	hs.outlineType = 'rounded-white';	hs.fadeInOut = true;	hs.captionEval = 'this.a.title';	hs.showCredits = false;	hs.dimmingOpacity = 0.75;	hs.captionOverlay.position = 'below';	hs.registerOverlay({		html: '<div class="closebutton" onclick="return hs.close(this)" title="Закрыть"></div>',		position: 'top right',		useOnHtml: true,		fade: 2 // fading the semi-transparent overlay looks bad in IE	});	hs.addSlideshow({		slideshowGroup: 'group1',		interval: 5000,		repeat: false,		useControls: true,		fixedControls: false,		overlayOptions: {			className: 'text-controls',			opacity: '1',			position: 'bottom center',			offsetX: '50',			offsetY: '-10',			relativeTo: 'viewport',			hideOnMouseOut: false		},		thumbstrip: {			mode: 'vertical',			position: 'middle left',			relativeTo: 'viewport'		}	});	// gallery config object});var config1 = {	slideshowGroup: 'group1',	transitions: ['expand', 'crossfade']};function openYouTube(opener) {    var returnValue;    // Safari Mobile doesn't have Flash, so we just let the device use the built-in    // YouTube viewer.    if (/(iPhone|iPod|iPad)/.test(navigator.userAgent)) {    	opener.href = opener.href.replace('/v/', '/watch?v=');    	returnValue = true;}    else returnValue = hs.htmlExpand(opener, {        objectType: 'swf',        objectWidth: 480,        objectHeight: 385,        transitions: ['fade'],        width: 480,        allowSizeReduction: false,        // always use this with flash, else the movie will be stopped on close:        preserveContent: false,        wrapperClassName: 'no-footer',        swfOptions: {            params: {                allowfullscreen: 'true'            }        },        src: opener.href.replace("watch?", "").replace("=", "/")+'&fs=1&autoplay=1', // convert from Youtube page to movie        maincontentText: 'You need to upgrade your Flash player'    });    return returnValue;}/*function openYouTube(opener) {    var returnValue = false;    // Safari Mobile doesn't have Flash, so we just let the device use the built-in    // YouTube viewer.    if (/(iPhone|iPod|iPad)/.test(navigator.userAgent)) {        opener.href = opener.href.replace('/v/', '/watch?v=');        returnValue = true;    }    else{    	returnValue = hs.htmlExpand(opener, {            objectType: 'swf',            objectWidth: 480,            objectHeight: 385,            width: 480,            useControls: false,            wrapperClassName: 'no-footer',            swfOptions: {                params: {                    allowfullscreen: 'true'                }            },            src: opener.href.replace("watch?", "").replace("=", "/")+'&fs=1&autoplay=1', // convert from Youtube page to movie            maincontentText: 'You need to upgrade your Flash player'        });    }	return returnValue;} */
