таким образом работает, но правда только в мазиле и эксплорере, в опере и хроме нет.
[CODE]<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div class="catalog-element" style="height:330px;">
<table width="100%" style="height:330px;" border="0" cellspacing="0" cellpadding="0">
<tr style="height:330px;">
<?if(is_array($arResult["PREVIEW_PICTURE"]) || is_array($arResult["DETAIL_PICTURE"])):?>
<td width="220" valign="top" style="height:50px;padding-top:10px;width:220px;">
<span style="color:rgb(151, 198, 20);font:23px Georgia;text-decoration:underline;"><?=$arResult["NAME"]?><br /><br /></span>
<?if(is_array($arResult["PREVIEW_PICTURE"]) && is_array($arResult["DETAIL_PICTURE"])):?>
<img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>" style="display:block;cursor:pointer;cursor: hand;" OnClick="document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='block'" />
<img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" id="image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>" style="display:none;cursor:pointer; cursor: hand;" OnClick="document.getElementById('image_<?=$arResult["DETAIL_PICTURE"]["ID"]?>').style.display='none';document.getElementById('image_<?=$arResult["PREVIEW_PICTURE"]["ID"]?>').style.display='block'" />
<?elseif(is_array($arResult["DETAIL_PICTURE"])):?>
<img border="0" src="<?=$arResult["DETAIL_PICTURE"]["SRC"]?>" width="<?=$arResult["DETAIL_PICTURE"]["WIDTH"]?>" height="<?=$arResult["DETAIL_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" />
<?elseif(is_array($arResult["PREVIEW_PICTURE"])):?>
<img border="0" src="<?=$arResult["PREVIEW_PICTURE"]["SRC"]?>" width="<?=$arResult["PREVIEW_PICTURE"]["WIDTH"]?>" height="<?=$arResult["PREVIEW_PICTURE"]["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" />
<?endif?>
<?if(count($arResult["MORE_PHOTO"])>0):?>
<br /><a href="#more_photo"><?=GetMessage("CATALOG_MORE_PHOTO")?></a>
<?endif;?>
<?endif;?>
<!-- <?foreach($arResult["DISPLAY_PROPERTIES"] as $pid=>$arProperty):?>
<?=$arProperty["NAME"]?>:<b> <?
if(is_array($arProperty["DISPLAY_VALUE"])):
echo implode(" / ", $arProperty["DISPLAY_VALUE"]);
elseif($pid=="MANUAL"):
?><a href="<?=$arProperty["VALUE"]?>"><?=GetMessage("CATALOG_DOWNLOAD")?></a><?
else:
echo $arProperty["DISPLAY_VALUE"];?>
<?endif?></b><br />
<?endforeach?> -->
</td>
<td valign="top" style="padding-left:25px;text-align:left;" align="left">
<?if($arResult["DETAIL_TEXT"]):?>
<br /><?=$arResult["DETAIL_TEXT"]?><br />
<?elseif($arResult["PREVIEW_TEXT"]):?>
<br /><?=$arResult["PREVIEW_TEXT"]?><br />
<?endif;?>
<script type="text/javascript">
/*! jQuery v1.7.1 jquery.com | jquery.org/license */
</script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$.fn.jqGalScroll = function(options){
return this.each(function(i){
var el = this
el.curImage = 0;
el.jqthis = $(this).css({position:'relative'});
el.jqchildren = el.jqthis.children();
el.opts = $.extend({}, jqGalScroll, options);
el.index = i;
el.totalChildren = el.jqchildren.size();
var width,height;
switch(el.opts.direction){
case 'horizontal':
width = el.totalChildren *el.opts.width;
height = el.opts.height;
break;
case 'vertical':
width = el.opts.width;
height = el.totalChildren *el.opts.height;
break;
default:
width = el.totalChildren *el.opts.width;
height = el.totalChildren *el.opts.height;
break;
};
el.container = $('<div id="jqGS'+i+'" class="jqGSContainer">').css({position:'relative'});
el.ImgContainer = $('<div class="jqGSImgContainer" style="height:'+el.opts.height+'px;position:relative;overflow:hidden">')
.css({height:el.opts.height,width:el.opts.width,position:'relative',overflow:'hidden'});
el.jqthis.css({height:height,width:width});
el.jqthis.wrap(el.container);
el.jqthis.wrap(el.ImgContainer);
el.pagination = $('<div class="jqGSPagination">');
el.jqthis.parent().parent().append(el.pagination);
var jqul = $('<ul>').appendTo(el.pagination);
var pos = {x:0,y:0};
el.jqchildren
.each(function(j){
var selected = '';
if(j == 0) selected = 'selected';
var $a = $('<a href="#'+(j)+'" class="'+selected+'">'+(j+1)+'</a>').click(function(){
var href = this.index;//href.replace(/^.*#/, '');
el.pagination.find('.selected').removeClass('selected');
$(this).addClass('selected');
var params = {};
if( el.opts.direction == 'diagonal'){
params = {right:(el.opts.width*href),bottom:(el.opts.height*href)}
}
else if( el.opts.direction == 'vertical'){
params = {bottom:(el.opts.height*href)}
}
else if( el.opts.direction == 'horizontal'){
params = {right:(el.opts.width*href)}
};
el.jqthis.stop().animate(params,el.opts.speed, el.opts.ease);
index = href;
return false;
});
var n = $a.get(0);
n.index = j;
$('<li>').appendTo(jqul).append($a);
if( el.opts.direction == 'diagonal'){
pos.x = j * el.opts.width;
pos.y = j * el.opts.height;
}
else if( el.opts.direction == 'horizontal'){
pos.x = j * el.opts.width;
}
else if( el.opts.direction == 'vertical'){
pos.y = j * el.opts.height;
};
var jqchild = $(this).css({height:el.opts.height,width:el.opts.width,position:'absolute',left:pos.x, top:pos.y});
var jqimg = jqchild.find('img').hide()
if(jqimg.parent().is('a')){
var p = jqimg.parent();
jqimg.get(0).linkHref = p.attr('href');
p.remove();
jqimg.appendTo(jqchild);
};
jqimg.click(function(){
var next = n.index + 1;
if((n.index + 1) == el.totalChildren ){
el.pagination.find('[href$=#0]').click();
}
else{
el.pagination.find('[href$=#'+next+']').click();
}
});
var $loader = $('<div class="jqGSLoader">').appendTo(jqchild);
var $titleHolder = $('<div class="jqGSTitle">').appendTo(jqchild).css({opacity:el.opts.titleOpacity}).hide();
var image = new Image();
image.onload = function(){
image.onload = null;
$loader.fadeOut();
jqimg.css({marginLeft:-image.width*.5,marginTop:-image.height*.5,position:'absolute',left:'50%',top:'50%'}).fadeIn();
var alt = jqimg.attr('alt');
if(typeof alt != 'undefined'){
$titleHolder.text(alt).fadeIn();
}
};
image.src = jqimg.attr('src');
});
}); // end : this.each(function()
}; // end : $.fn.jqGalScroll
jqGalScroll = {
ease: null,
speed:0,
height: 230,
width: 240,
titleOpacity : .60,
direction : 'horizontal' // vertical horizontal diagonal
};
})(jQuery);
</script>
<script type="text/javascript">
jQuery(document).ready(function(){
$('#one').jqGalScroll();
});
</script>
<style type="text/css">
.jqGSContainer{position:relative;width:750px;;}
.jqGSContainer .jqGSImgContainer{}
.jqGSContainer .jqGSImgContainer ul{padding:0;margin:0;position:relative;list-style:none;}
.jqGSContainer .jqGSImgContainer ul li{padding:0;margin:0;position:relative;margin-top:0;margin-bottom:0px;float:left;}
.jqGSContainer .jqGSImgContainer ul li .jqGSLoader{width:100%;height:100%;position:absolute;}
.jqGSContainer .jqGSImgContainer ul li img{border:1px solid #fff;}
.jqGSContainer .jqGSImgContainer ul li .jqGSTitle{background:#000;position:absolute;right:0px;top:0px; padding:3px;color:#fff;width:300px}
.jqGSContainer .jqGSPagination{position:relative;width:100%;height:20px;top:5px;padding: 5px 0;}
.jqGSContainer .jqGSPagination ul{padding:0;margin:0;list-style:none;position:relative;float:right;}
.jqGSContainer .jqGSPagination ul li{padding:0;margin-right:5px;float:left;padding-right:1px;text-align:center;padding-bottom:1px;}
.jqGSContainer .jqGSPagination ul li a{padding:2px 0px;background:#000;border:1px solid #fff; color: #fff;text-decoration:none;display:block;width:20px;font:10px Verdana, Arial, Helvetica, sans-serif;}
.jqGSContainer .jqGSPagination ul li a.selected{background:#fff;color:#f03;border: 1px solid #eaeaea;}
.jqGSContainer .jqGSPagination ul li a:hover{background:#fff;color:#000;border:1px solid #fff;}
.jqGSImgContainer{border:1px solid #000;}
</style>
<ul id="one">
<?foreach($arResult["MORE_PHOTO"] as $PHOTO):?>
<li>
<img border="0" src="<?=$PHOTO["SRC"]?>" width="<?=$PHOTO["WIDTH"]?>" height="<?=$PHOTO["HEIGHT"]?>" alt="<?=$arResult["NAME"]?>" title="<?=$arResult["NAME"]?>" />
</li>
<?endforeach?>
</ul>
</td>
</tr>
</table>
<?if(is_array($arResult["SECTION"])):?>
<a href="<?=$arResult["SECTION"]["SECTION_PAGE_URL"]?>"><?=GetMessage("CATALOG_BACK")?></a>
<?endif?>
</div>
[/CODE]