first commit

This commit is contained in:
2024-10-25 14:16:28 +02:00
commit 925276dbb2
33795 changed files with 4780077 additions and 0 deletions

View File

@@ -0,0 +1,256 @@
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author ST-themes <hellolee@gmail.com>
* @copyright 2007-2017 ST-themes
* @license Use, by you or one client for one Prestashop instance.
*/
var googleFontsJson = '';
jQuery(function($){
$('#add_google_font').click(function(){
var font_name = $('#google_font_select').val();
var inputGoogleFontName = $('#google_font_name');
var divGoogleFontName = $('#curr_google_font_name');
var variant = $('#google_font_weight').val();
var style = font_weight = font_style = '';
if (font_name == 0)
font_name = 'inherit';
if (!variant)
variant = 'regular';
var nameCut = inputGoogleFontName.val().split('¤');
if ($.inArray(font_name+':'+variant, nameCut)==-1)
inputGoogleFontName.val(inputGoogleFontName.val() + font_name + ':' + variant + '¤');
var font_weight_arr = variant.match(/\d+/g);
var font_style_arr = variant.match(/[^\d]+/g);
if(font_weight_arr)
font_weight = font_weight_arr[0];
if(font_style_arr)
font_style = font_style_arr[0];
style = 'font-family:\''+font_name+'\';';
if (variant == 'regular')
{
//Cause 400 is the default value.
// style += 'font-weight:400;';
}
else
{
if (font_weight)
style += 'font-weight:'+font_weight+';';
if (font_style)
style += 'font-style:'+font_style+';';
}
var identi = font_name.toLowerCase().replace(/\W/g,'_');
if(!$('#'+identi+'_li').size())
divGoogleFontName.append('<li id="#'+identi+'_li" class="form-control-static"><button type="button" class="delGoogleFont btn btn-default" name="' + font_name + '"><i class="icon-remove text-danger"></i></button>&nbsp;<span style="'+style+'"> style="'+style+'"</span></li>');
if(!$('#'+identi+'_link').size())
$('head').append('<link id="'+identi+'_link" rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=' + font_name.replace(' ', '+') + ':' + variant + '" />');
});
$('#curr_google_font_name').delegate('.delGoogleFont', 'click', function(){
delGoogleFont($(this).attr('name'));
});
if(typeof(googleFontsString)!= 'undefined' && googleFontsString && !googleFontsJson)
googleFontsJson = $.parseJSON(googleFontsString);
$('#google_font_select').each(function(){
handle_font_change($(this));
return false;
});
$('.st_delete_image').click(function(){
var self = $(this);
var id_lang = self.data('lang');
var id = self.data('id');
$.getJSON(currentIndex+'&token='+token+'&configure=stbanner&id_st_banner='+id+'&id_lang='+id_lang+'&act=delete_image&ts='+new Date().getTime(),
function(json){
if(json.r) {
self.parent().siblings('.help-block').find('img').remove();
self.parent().remove();
}
else
alert('Error');
}
);
return false;
});
$('.delete_slider_image').click(function(){
var self = $(this);
var s_id = self.data('s_id'),
s_k = self.data('s_k'); //
$.getJSON(currentIndex+'&token='+token+'&configure=stbanner&st_s_id='+s_id+'&st_s_k='+s_k+'&act=delete_slider_image&ts='+new Date().getTime(),
function(json){
if(json.r)
{
self.closest('.image_thumb_block').empty();
}
else
alert('Error');
}
);
return false;
});
});
var delGoogleFont = function(id)
{
var div = $('#curr_google_font_name');
var name = $('#google_font_name');
// Cut hidden fields in array
var nameCut = name.val().split('¤');
// Reset all hidden fields
name.val('');
div.empty();
for (i in nameCut)
{
// If empty, error, next
if (!nameCut[i])
continue ;
// Add to hidden fields no selected products OR add to select field selected product
if (nameCut[i] != id)
{
name.val(name.val()+nameCut[i]+'¤');
var selected_arr = nameCut[i].split(':');
var style = font_weight = font_style = '';
if(selected_arr[1])
{
var font_weight_arr = selected_arr[1].match(/\d+/g);
var font_style_arr = selected_arr[1].match(/[^\d]+/g);
if(font_weight_arr)
font_weight = font_weight_arr[0];
if(font_style_arr)
font_style = font_style_arr[0];
style = 'font-family:\''+selected_arr[0]+'\';';
if (selected_arr[1] == 'regular')
{
//Cause 400 is the default value.
// style += 'font-weight:400;';
}
else
{
if (font_weight)
style += 'font-weight:'+font_weight+';';
if (font_style)
style += 'font-style:'+font_style+';';
}
}
div.append('<li class="form-control-static"><button type="button" class="delGoogleFont btn btn-default" name="' + nameCut[i] + '"><i class="icon-remove text-danger"></i></button>&nbsp;<span style="'+style+'"> style="'+style+'"</span></li>');
}
}
return false;
};
var handle_font_change = function(that)
{
var selected_font = $(that).val();
var identi = $(that).attr('id');
var font_weight = font_style = 'normal';
var variant_dom = $('#'+identi.replace('_select','_weight')).empty();
var arr_default = {'700':'700', 'italic':'italic', '700italic':'700italic'};
var default_variant = 'regular';
if(selected_font!=0)
{
if(!$('#google_font_link').size())
$('head').append('<link id="google_font_link" rel="stylesheet" type="text/css" href="" />');
var cf_key = selected_font.replace(/\s/g, '_');
var variant = '';
var arr_variants = {};
$.each(googleFontsJson[cf_key]['variants'], function(i,n){
arr_variants[n] = n;
});
$.extend(arr_variants, arr_default);
$.each(arr_variants, function(i,n){
var option_dom = $('<option>', {
value: n,
text: n
});
if(n==default_variant)
{
variant = default_variant;
option_dom.attr('selected','selected');
}
variant_dom.append(option_dom);
});
if(!variant)
{
variant = googleFontsJson[cf_key]['variants'][0];
var font_weight_arr = variant.match(/\d+/g);
var font_style_arr = variant.match(/[^\d]+/g);
if(font_weight_arr)
font_weight = font_weight_arr[0];
if(font_style_arr)
font_style = font_style_arr[0];
if (font_style == default_variant)
font_style = 'normal';
}
$('link#google_font_link').attr({href:'//fonts.googleapis.com/css?family=' + selected_font.replace(' ', '+')+':'+variant});
$('#google_font_example').css({'font-family':selected_font,'font-weight':font_weight,'font-style':font_style});
} else {
var regular = {default_variant:default_variant};
$.extend(arr_default, regular);
$.each(arr_default, function(i,n){
var option_dom = $('<option>', {
value: n,
text: n
});
if(n==default_variant)
{
variant = default_variant;
option_dom.attr('selected','selected');
}
variant_dom.append(option_dom);
});
}
};
var handle_font_style = function(that){
var identi = $(that).attr('id');
var selected_font = $('#'+identi.replace('_weight','_select')).val();
var selected_weight = $(that).val();
var font_weight = font_style = 'normal';
if(selected_weight)
{
var font_weight_arr = selected_weight.match(/\d+/g);
var font_style_arr = selected_weight.match(/[^\d]+/g);
if(font_weight_arr)
font_weight = font_weight_arr[0];
if(font_style_arr)
font_style = font_style_arr[0];
if (font_style == 'regular')
font_style = 'normal';
}
else
return false;
if(!$('#google_font_link').size())
$('head').append('<link id="google_font_link" rel="stylesheet" type="text/css" href="" />');
if (selected_font != 0)
$('link#google_font_link').attr({href:'//fonts.googleapis.com/css?family=' + selected_font.replace(' ', '+')+':'+selected_weight});
$('#google_font_example').css({'font-family':selected_font,'font-weight':font_weight,'font-style':font_style});
};

View File

@@ -0,0 +1,424 @@
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author ST-themes <hellolee@gmail.com>
* @copyright 2007-2017 ST-themes
* @license Use, by you or one client for one Prestashop instance.
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var functions = {
update_source_code: function(adv_source_code, that){
adv_source_code.val($((typeof(adv_content_only)!=='undefined' && adv_content_only ? '.layered_content' : '.st_banner_block'), that).html().replace(/<img[^>]*>/g, "").replace(/(?:\r\n|\r|\n)/g, "").replace(/\t/g, ""));
},
text_val: function(element, that){
var text_val = element.val();
var target = $(element.data('target'), that);
$(element.data('target'), that).html(text_val);
if(text_val)
target.removeClass('hidden');
else
target.addClass('hidden');
},
button_val: function(element, that){
if(element.val())
$(element.data('target'), that).removeClass('hidden-xs-up').html(element.val()).parent('a').attr('title', element.val());
else
$(element.data('target'), that).addClass('hidden-xs-up');
},
button_url_val: function(element, that, banner_url_val){
var target = $(element.data('target'), that);
var url = element.val();
if(banner_url_val.val() || !url)
{
if(target.parent('a').length)
target.unwrap();
}
else
{
if(target.parent('a').length)
target.parent('a').attr('href', url);
else
target.wrap( '<a href="'+url+'" title="'+element.closest('.col-9').find('.adveditor_button').val()+'" rel="nofollow" class="style_button_wrap"></a>');
}
},
banner_url_val: function(element, that, adv_content, button_url_val){
var url = element.val();
if(url){
if(that.find('.style_button').parent('a').length)
that.find('.style_button').unwrap();
if(adv_content.parent('a').length)
adv_content.parent('a').attr('href', url);
else
adv_content.wrap( '<a href="'+url+'" title="'+element.closest('.col-9').find('.adveditor_banner_url_title').val()+'" rel="nofollow" class="style_a_wrap"></a>');
}
else{
if(adv_content.parent('a').length)
adv_content.unwrap();
//
$.each(button_url_val,function(){
var url = $(this).val();
if(url){
var target = $($(this).data('target'), that);
if(target.parent('a').length)
target.parent('a').attr('href', url);
else
target.wrap( '<a href="'+url+'" title="'+$(this).closest('.col-9').find('.adveditor_button').val()+'" rel="nofollow" class="style_button_wrap"></a>');
}
else{
//useless
var target = $($(this).data('target'), that);
if(target.parent('a').length)
target.unwrap();
}
});
}
},
banner_url_title_val: function(element, that){
$('.style_a_wrap', that).attr('title', element.val());
},
color_val: function(element, that){
$(element.data('target'), that).css(element.data("property"), element.val());
},
size_val: function(element, that){
var _val = element.val();
var property = element.data("property");
if(property == 'font-size' && element.data("unit")=='em')
_val = Math.round(_val/12*100) / 100;
$.each(property.split(' '),function(index, value){
if(element.data(' ') && _val===0)
$(element.data('target'), that).css(value, '0'+element.data("unit"));
else if(_val)
$(element.data('target'), that).css(value, _val+element.data("unit"));
else
$(element.data('target'), that).css(value, '');
});
if(property == 'height' && element.data("line-height"))
$(element.data('target'), that).css('line-height', (_val-parseInt(element.data("line-height")))+element.data("unit"));
},
width_val: function(element, that){
var _val = parseInt(element.val());
$(element.data('target'), that).removeClass('width_100 width_90 width_80 width_70 width_60 width_50 width_40 width_30 width_20 width_10 width_91 width_81 width_71 width_61 width_51 width_41 width_31 width_21 width_11 width_92 width_82 width_72 width_62 width_52 width_42 width_32 width_22 width_12').addClass('width_'+_val);
},
font_val: function(element, that, googleFontsJson){
var identi = element.attr('id');
var selected_font = element.val();
var font_weight = font_style = 'normal';
var variant_dom = $('#'+identi+'_weight').empty();
if(selected_font)
{
if(!$('#'+identi+'_link').size())
$('head').append('<link id="'+identi+'_link" rel="stylesheet" type="text/css" href="" />');
var cf_key = selected_font.replace(/\s/g, '_');
var variant = '';
$.each(googleFontsJson[cf_key]['variants'], function(i,n){
var option_dom = $('<option>', {
value: n,
text: n
});
if(n=='regular')
{
variant = 'regular';
option_dom.attr('selected','selected');
}
variant_dom.append(option_dom);
});
if(!variant)
{
variant = googleFontsJson[cf_key]['variants'][0];
var font_weight_arr = variant.match(/\d+/g);
var font_style_arr = variant.match(/[^\d]+/g);
if(font_weight_arr)
font_weight = font_weight_arr[0];
if(font_style_arr)
font_style = font_style_arr[0];
if (font_style == 'regular')
font_style = 'normal';
}
$('link#'+identi+'_link').attr({href:'//fonts.googleapis.com/css?family=' + selected_font.replace(' ', '+')+':'+variant});
}
$(element.data('target'), that).css({'font-family': selected_font, 'font-weight':font_weight,'font-style':font_style});
},
font_weight_val: function(element, that){
var identi = element.attr('id').replace('_weight','');
var selected_font = $('#'+identi).val();
var selected_weight = element.val();
var font_weight = font_style = 'normal';
if(selected_weight)
{
var font_weight_arr = selected_weight.match(/\d+/g);
var font_style_arr = selected_weight.match(/[^\d]+/g);
if(font_weight_arr)
font_weight = font_weight_arr[0];
if(font_style_arr)
font_style = font_style_arr[0];
if (font_style == 'regular')
font_style = 'normal';
}
else
return false;
if(!$('#'+identi+'_link').size())
$('head').append('<link id="'+identi+'_link" rel="stylesheet" type="text/css" href="" />');
$('link#'+identi+'_link').attr({href:'//fonts.googleapis.com/css?family=' + selected_font.replace(' ', '+')+':'+selected_weight});
$(element.data('target'), that).css({'font-family':selected_font,'font-weight':font_weight,'font-style':font_style});
},
h_align: function(element, h_align, adv_content){
h_align.each(function(){
adv_content.removeClass($(this).val());
});
adv_content.addClass(element.val());
},
v_align: function(element, v_align, adv_content){
v_align.each(function(){
adv_content.removeClass($(this).val());
});
adv_content.addClass(element.val());
},
t_align: function(element, t_align, adv_content){
t_align.each(function(){
adv_content.removeClass($(this).val());
});
adv_content.addClass(element.val());
},
btn_val: function(element, btn_val, that){
var target = $(element.data('target'), that);
btn_val.each(function(){
target.removeClass($(this).attr('class').replace('adveditor_btn btn',''));
});
target.addClass(element.attr('class').replace('adveditor_btn btn',''));
}
};
$.fn.adveditor = function(options) {
var options = $.extend({
googleFontsJson: ''
},
options);
$('.adveditor_close').click(function(){
window.top.$('#modal_adv_editor').modal('hide');
});
this.each(function() {
var that = $(this),
adv_content = $('.adveditor_content', that),
adv_insert = $('.adveditor_insert', that),
adv_code = $('.adveditor_code', that),
adv_copy = $('.adveditor_copy', that),
adv_btn_hide = $('.adveditor_btn_hide', that),
adv_btn_show = $('.adveditor_btn_show', that),
adv_transform = $('.adveditor_transform', that),
adv_help_link = $('.adveditor_help_link', that),
adv_source_code_block = $('.adveditor_source_code_block', that),
adv_source_code = $('.adveditor_source_code', that),
text_val = $('.adveditor_text_val', that),
color_val = $('.mColorPickerInput', that),
size_val = $('.adveditor_size', that),
font_val = $('.adveditor_font', that),
width_val = $('.adveditor_width', that),
font_weight_val = $('.adveditor_font_weight', that),
banner_url_val = $('.adveditor_banner_url', that),
banner_url_title_val = $('.adveditor_banner_url_title', that),
button_val = $('.adveditor_button', that),
button_url_val = $('.adveditor_button_url', that),
btn_val = $('.adveditor_btn', that),
h_align = $('.h_align', that),
v_align = $('.v_align', that);
t_align = $('.t_align', that);
if(window.top!=window.self){
adv_insert.on('click', function(e){
window.top.tinyMCE.get((typeof(adveditor_target)!=='undefined' ? adveditor_target : 'description')+'_'+window.top.id_language).setContent(adv_source_code.val());
window.top.tinyMCE.triggerSave();
//
var google_font_name = '';
$.each(font_val, function(){
if($(this).val())
google_font_name += $(this).val()+':'+$('#'+$(this).attr('id')+'_weight').val()+'¤';
});
if(google_font_name)
{
var google_font_field = window.top.$('#google_font_name');
google_font_field.val(google_font_field.val()+google_font_name);
}
var timerId = null;
var alter_message = $(this).closest('.col-9').find('.alert-success').removeClass('hidden-xs-up');
function hideAlertSuccess()
{
alter_message.addClass('hidden-xs-up');
clearTimeout(timerId);
}
timerId = setTimeout(hideAlertSuccess, 3000);
});
}
adv_btn_hide.on('click',function(e){
$($(this).data('target'), that).addClass('hidden-xs-up');
functions.update_source_code(adv_source_code, that);
});
adv_btn_show.on('click',function(e){
$($(this).data('target'), that).removeClass('hidden-xs-up');
functions.update_source_code(adv_source_code, that);
});
adv_transform.on('click',function(e){
$($(this).data('target'), that).removeClass('text-capitalize text-uppercase text-lowercase').addClass($(this).data('transform'));
functions.update_source_code(adv_source_code, that);
});
adv_code.on('click',function(e){
adv_source_code_block.toggleClass('display_none');
});
adv_help_link.on('click',function(e){
$(this).find('img').toggle();
return false;
});
adv_copy.on('click',function(e){
functions.update_source_code(adv_source_code, that);
adv_source_code.select();
document.execCommand("copy");
var timerId = null;
var alter_message = $(this).closest('.col-9').find('.alert-success').removeClass('hidden-xs-up');
function hideAlertSuccess()
{
alter_message.addClass('hidden-xs-up');
clearTimeout(timerId);
}
timerId = setTimeout(hideAlertSuccess, 3000);
});
text_val.each(function(){
$(this).on('change',function(){
functions.text_val($(this), that);
functions.update_source_code(adv_source_code, that);
});
functions.text_val($(this), that);
});
button_val.each(function(){
$(this).on('change',function(){
functions.button_val($(this), that);
functions.update_source_code(adv_source_code, that);
});
// functions.button_val($(this), that);
});
button_url_val.each(function(){
$(this).on('change',function(){
functions.button_url_val($(this), that, banner_url_val);
functions.update_source_code(adv_source_code, that);
});
// functions.button_url_val($(this), that, banner_url_val);
});
banner_url_val.each(function(){
$(this).on('change',function(){
functions.banner_url_val($(this), that, adv_content, button_url_val);
functions.update_source_code(adv_source_code, that);
});
// empty by default.
});
banner_url_title_val.each(function(){
$(this).on('change',function(){
functions.banner_url_title_val($(this), that, adv_content);
functions.update_source_code(adv_source_code, that);
});
// empty by default.
});
color_val.each(function(){
$(this).on('change',function(){
functions.color_val($(this), that);
functions.update_source_code(adv_source_code, that);
});
functions.color_val($(this), that);
});
size_val.each(function(){
$(this).on('change',function(){
functions.size_val($(this), that);
functions.update_source_code(adv_source_code, that);
});
functions.size_val($(this), that);
});
font_val.each(function(){
$(this).on('change',function(){
functions.font_val($(this), that, options.googleFontsJson);
functions.update_source_code(adv_source_code, that);
});
functions.font_val($(this), that, options.googleFontsJson);
});
font_weight_val.each(function(){
$(this).on('change',function(){
functions.font_weight_val($(this), that);
functions.update_source_code(adv_source_code, that);
});
functions.font_weight_val($(this), that);
});
width_val.each(function(){
$(this).on('change',function(){
functions.width_val($(this), that);
functions.update_source_code(adv_source_code, that);
});
functions.width_val($(this), that);
});
h_align.on('change',function(){
functions.h_align($(this), h_align, adv_content);
functions.update_source_code(adv_source_code, that);
});
functions.h_align(h_align.filter(':checked'), h_align, adv_content);
v_align.on('change',function(){
functions.v_align($(this), v_align, adv_content);
functions.update_source_code(adv_source_code, that);
});
functions.v_align(v_align.filter(':checked'), v_align, adv_content);
t_align.on('change',function(){
functions.t_align($(this), t_align, adv_content);
functions.update_source_code(adv_source_code, that);
});
functions.t_align(t_align.filter(':checked'), t_align, adv_content);
btn_val.on('click',function(){
functions.btn_val($(this), btn_val, that);
functions.update_source_code(adv_source_code, that);
});
//
functions.update_source_code(adv_source_code, that);
});
return this;
};
}));

View File

@@ -0,0 +1,34 @@
<?php
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author ST-themes <hellolee@gmail.com>
* @copyright 2007-2017 ST-themes
* @license Use, by you or one client for one Prestashop instance.
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,61 @@
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author ST-themes <hellolee@gmail.com>
* @copyright 2007-2017 ST-themes
* @license Use, by you or one client for one Prestashop instance.
*/
;(function($){
$.fn.ststaticbanner = function(banner_height) {
if(typeof(st_responsive)=='undefined' || !st_responsive)
return false;
var max_page_width = (typeof(st_responsive_max)=='undefined' || !st_responsive_max) ? 970 : 1170
var ratio = banner_height / max_page_width;
var that = $(this);
var columns = that.children('.row').children('.banner_col');
function banner_auto_height(){
var container_height = Math.round((that.width()) * ratio);
columns.each(function(){
var row_height = Math.round((container_height-20*(that.children('.row').children('.banner_b').size())) * $(this).data('height')/100)
var rows = $(this).children('.row').children('.banner_col');
if(!rows.size())
$(this).find('.st_banner_block').height(row_height);
else
{
var rows_size = rows.size();
rows.each(function(index) {
$(this).find('.st_banner_block').height(Math.round((row_height-20*(rows_size-1)) * $(this).data('height')/100));
});
}
});
}
var banner_rs;
$(window).resize(function(){
clearTimeout(banner_rs);
var rand_s = parseInt(Math.random()*200 + 300);
banner_rs = setTimeout(function() {
banner_auto_height();
}, rand_s);
});
banner_auto_height();
};
})(jQuery);