|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /home/jackjohn/www/shopsite-images/en-EU/javascript/ |
Upload File : |
var IEVersion = getIEVersionNumber();
function getIEVersionNumber() {
var ua = navigator.userAgent;
var MSIEOffset = ua.indexOf("MSIE ");
if (MSIEOffset == -1) {
return 100;
} else {
return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
}
}
function hide(t) {
/*var top_tr = t.closest('tbody');
top_tr.next().css({display:'none'});
t.parent().siblings('.section_text').css({display:'none'});*/
t.parent().next().css({display:'none'});
t.parent().next().next().css({display:'none'});
t.html("<img src='" + image_url + "/plus.gif'>");
t.removeClass('section_hide');
t.addClass('section_show');
$.post("products.cgi", { ajax: "1", prod_section_off: t.parent().attr('class').substr(13) });
}
function show(t) {
t.parent().next().css({display:'block'});
t.parent().next().next().css({display:'block'});
/*var top_tr = t.closest('tbody');
if (IEVersion <= 7)
top_tr.next().css({display:'block'});
else
top_tr.next().css({display:'table-row-group'});
t.parent().siblings('.section_text').css({display:'inline'});*/
t.html("<img src='" + image_url + "/minus.gif'>");
t.removeClass('section_show');
t.addClass('section_hide');
$.post("products.cgi", { ajax: "1", prod_section_on: t.parent().attr('class').substr(13) });
}
$(function () {
$('.implicit').css({display:'block'});
$('.section_head').append(" <a class='section_show'><img src='" + image_url + "/plus.gif'></a>");
$('.explanation').css({display:'none'});
var on_count = 0;
for (var i in sections_on) {
if ( $('.'+ sections_on[i]).length > 0) {
show( $('.'+ sections_on[i]).find('.section_show'));
on_count++;
}
}
$('.content').css({display:'block'});
$('#footer').css({display:'block'});
if (on_count > 0)
$('.item_head').after(" <div class=sections_global>Hide all sections<img class='all_hide' src='" + image_url + "/minus.gif'></div>");
else
$('.item_head').after(" <div class=sections_global>Show all sections<img class='all_show' src='" + image_url + "/plus.gif'></div>");
$(document).on('click','.all_hide', function() {
$(this).parent().next().find('.section_hide').click();
$(this).parent().html("Show all sections<img class='all_show' src='" + image_url + "/plus.gif'>");
});
$(document).on('click','.all_show', function() {
$(this).parent().next().find('.section_show').click();
$(this).parent().html("Hide all sections<img class='all_hide' src='" + image_url + "/minus.gif'>");
});
});
$(document).on('click','.section_hide', function () {
hide($(this));
});
$(document).on('click','.section_show', function () {
show($(this));
});