Да, вот код
;
jQuery(document).ready(function($) {
$(".price-con-item").heightEqules();
$(".gallery-item-page").gallerySdm();
$(".exp-docs-wrap ul li .img a").fancybox({"autoResize":false});
$(".news-images-wrap ul li a").fancybox({"autoResize":false});
$(".price-table-wrap table").priceTable();
$(".exp-docs-wrap ul li").expDocs();
});
(function($) {
"use strict";
Number.prototype.isInt=function(){
return (Math.round(this)==this);
}
Number.prototype.roundTo=function(n){
var x = 0;
if (typeof(n) == 'number')
if (n.isInt()) {
if (n >= -6 && n <= 6) {
x = n;
}
}
x = Math.pow(10,x);
return Math.round(this*x) / x;
}
Math.roundTo=function(i,n) {
if (typeof(i) == 'number') {
return i.roundTo(n);
} else {
return false;
}
}
$.fn.heightEqules = function(options) {
if (!this.length) {
return;
}
var defaults = {}
var settings = $.extend({}, defaults, options);
var maxHeight = 0;
this.each(function () {
var h = $(this).height();
if (h > maxHeight) {
maxHeight = h;
}
});
this.height(maxHeight);
}
$.fn.expDocs = function(options) {
if (!this.length) {
return;
}
var defaults = {}
var settings = $.extend({}, defaults, options);
this.each(function () {
var $this = $(this); //li
var $a = $this.find(".img a");
if ($a.length > 1) {
$a.css("display","none");
var $first = $a.first();
$first.css("display","");
$a.parent().addClass("many-docs");
}
});
}
$.fn.priceTable = function(options) {
if (!this.length) {
return;
}
var defaults = {}
var settings = $.extend({}, defaults, options);
var maxHeight = 0;
var $table = this;
console.log(11);
$table.find("tr").each(function () {
var $tr = $(this);
var $firstTd = $tr.children("td:first");
if (!$firstTd.length) {
return;
}
if ($firstTd.html() == "") {
$tr.addClass("subtitle");
} else if ($firstTd.html() == "---") {
$tr.addClass("subsubtitle");
$firstTd.html("");
}
});
}
$.fn.gallerySdm = function(options) {
if (!this.length) {
return;
}
var defaults = {
duration: 600
}
var settings = $.extend({}, defaults, options);
var $galleryWrap = this;
var moveFlag = 0;
var $mainImg = $galleryWrap.find(".main-picture img");
var $toPrev = $galleryWrap.find(".pic-list-wrap .to-prev");
var $toNext = $galleryWrap.find(".pic-list-wrap .to-next");
var $list = $galleryWrap.find(".pic-list-wrap .list-contaner ul");
var step = $list.children("li").height();
var galHeight = $galleryWrap.find(".pic-list-wrap .list-contaner").height();
startSetting();
function startSetting() {
var $first = $list.find("a").first();
$first.parent().addClass("active");
$mainImg.attr("src", $first.attr("href"));
}
$list.find("a").click(function () {
var $this = $(this);
var href = $this.attr("href");
$mainImg.attr("src", href);
$list.children("li").removeClass("active");
$this.parent().addClass("active");
return false;
});
$toPrev.click(move);
$toNext.click(move);
function move () {
var $this = $(this);
var curTop = parseInt($list.css("top"));
var curTop = (curTop)? (curTop) : (0) ;
if ($this.attr("class").search("to-prev")!=-1) {
var newPos = curTop + step;
} else {
var newPos = curTop - step;
}
var kray = galHeight - $list.height();
if (newPos > 0) {
newPos = kray;
}
if (newPos < kray) {
newPos = 0;
}
$list.animate({top:newPos}, settings.duration, function () {});
}
}
})(jQuery);
Как теперь все это залить и запустить на Joomla?))И если есть алгоритм как все это превратить в модуль, чтобы я смог сам его редактировать.
Заранее спасибо)