var js_options = {"global":{"style_edit_mode":"","language_id":null,"language":"german","language_code":"de","http_server":"http:\/\/www.ctj24.de","dir_ws_catalog":"\/","shop_root":"http:\/\/www.ctj24.de\/","shop_name":"RAM-Mount Halterungen"},"social_share":{"facebook_share_box":{"image":"\"\"","code":"'); this.load_box('#iframe_layer', 100, true); // BOF MOD by PT $('#menubox_gm_scroller').css({ display: 'none' }); if($(document).height() > $('#product_images_box').height()) { var pt_height = $(document).height(); } else { var pt_height = $('#product_images_box').height()+ 200; } $('#__dimScreen').css({height: pt_height + 'px'}); // EOF MOD by PT } this.load_box = function(box_id, fade_background_speed, fade_in, mb_height) { // scroll to top: scroll(0,0); if(fb)console.log('load_box: ' + box_id); if(typeof v == 'undefined') var fade_background_speed = 100; if(typeof fade_in == 'undefined') var fade_in = true; current_box_id = box_id; if(navigator.appVersion.match(/MSIE [0-6]\./)) { this.ie6_fix(true); } if(box_id == '#iframe_layer') { $(current_box_id).css( { zIndex: '1002', display: 'none' }); $.dimScreenIFrame(fade_background_speed, 0.7, function() { if(fb)console.log('dim done:' + current_box_id); if(fade_in) $(current_box_id).fadeIn(); else $(current_box_id).show(); }, mb_height); } else { $(current_box_id).css( { zIndex: '1000', display: 'none' }); $.dimScreen(fade_background_speed, 0.7, function() { if(fb)console.log('dim done:' + current_box_id); if(fade_in) $(current_box_id).fadeIn(); else $(current_box_id).show(); }, mb_height); } } this.close_iframe_box = function() { var t_close = true; if(typeof(gm_style_edit_mode_running) == 'boolean' && gm_style_edit_mode_running == true) { t_close = confirm('Klicken Sie auf Abbrechen, wenn Sie diesen Link nicht aufrufen, sondern bearbeiten möchten.'); } if(t_close) { if(typeof(gmLightBox) != 'undefined') { $('#iframe_box_bar').remove(); $('#iframe_box').remove(); this.close_box('#iframe_box'); } } return false; } this.close_box = function(p_box_id) { if(fb)console.log(current_box_id + ': close_box()'); // BOF MOD by PT $('#menubox_gm_scroller').css({ display: 'block' }); // EOF MOD by PT if(typeof(p_box_id) == 'undefined' || p_box_id != '#iframe_box') { $.dimScreenStop(); } else { $.dimScreenStopIFrame(); } $(current_box_id).fadeOut("normal", function(){ if(navigator.appVersion.match(/MSIE [0-6]\./)) { $('.lightbox_visibility_hidden').css( { visibility: 'visible' }); coo_this.ie6_fix(false); } }); current_box_id = ''; } this.centered_left = function(element_width) { var x = (screen.width / 2) - (element_width / 2); if(fb)console.log('centered width:' + x); return Math.round(x); } this.centered_top = function(element_height) { var y = (screen.height / 2) - (element_height / 2); if(fb)console.log('centered height:' + y); return Math.round(y); } this.ie6_fix = function(p_hide) { if(p_hide) { $('select').each(function() { if($(this).css('visibility') != 'hidden' && $(this).css('display') != 'none') { t_ie6_elements_array.push(this); $(this).css( { visibility: 'hidden' }); } }); } else { for(var i = 0; i < t_ie6_elements_array.length; i++) { $(t_ie6_elements_array[i]).css( { visibility: 'visible' }); } } } this.test = function() { $('.wrap_shop').append('
'); $('#test_box').css( { position: 'absolute', left: this.centered_left(500) + 'px', top: '150px', width: '500px', height: '0px', background: 'white' }); this.load_box('#test_box'); } } /**/ /* GMScroller.js.php */ /**/ function GMScroller(){ var x = null; var counter = 0; var scroller_stop = 0; var content_height = 0; this.scroll = function(){ if(content_height == 0){ document.getElementById('gm_scroller').style.display = "block"; document.getElementById('gm_scroller').style.padding = "170px 0px 170px 0px"; content_height = Number(document.getElementById("gm_scroller").offsetHeight); } clearTimeout(x); x = window.setTimeout("gmScroller.scroll()", Number("50")); if(scroller_stop == 1) return; document.getElementById('menubox_gm_scroller_body').scrollTop = counter; counter++; if(counter == content_height - Number("170")){ counter = 0; } } this.start = function() { x = window.setTimeout("gmScroller.scroll()", Number("50")); } this.set_stop = function(stop_val) { scroller_stop = stop_val; } } var gmScroller = new GMScroller(); $(document).ready(function() { if(fb)console.log("menubox_gm_scroller ready"); if($("#menubox_gm_scroller").attr('id') == 'menubox_gm_scroller'){ gmScroller.start(); } $('#menubox_gm_scroller_body').hover( function() { gmScroller.set_stop(1); }, function() { gmScroller.set_stop(0); } ); }); /**/ /* gm_shopping_cart.js */ /**/ var gm_qty_changed = false; function gm_qty_is_changed(old_qty, new_qty, gm_message) { if(new_qty != old_qty) { $("#gm_checkout").attr('href', "javascript:alert('" + gm_message + "')"); } return; } /**/ /* ActionSubmitHandler.js */ /**/ function ActionSubmitHandler() { if(fb)console.log('ActionSubmitHandler ready'); this.init_binds = function() { if(fb)console.log('ActionSubmitHandler init_binds'); $('.action_submit').die('click'); $('.action_submit').live('click', function() { if(fb)console.log('.action_submit click'); if($(this).closest('form').length > 0) { if($(this).hasClass('replace_form_action')) { if(fb)console.log('replace_form_action found!'); // submit button needs own action url var t_new_action_url = $(this).attr('href'); if($(this).closest('form').length > 0) { $(this).closest('form').attr('action', t_new_action_url); } } // TODO: better solution for executing onsubmit functions // and regarding return value -> stop submit in false-case if(typeof($(this).closest('form').attr('onsubmit')) == 'string') { if(fb)console.log('found onsubmit in form-tag!'); var t_onsubmit = $(this).closest('form').attr('onsubmit').replace('return ', ''); var t_onsubmit_return = eval(t_onsubmit); if(fb)console.log('onsubmit evaluated'); if(t_onsubmit_return == false) { if(fb)console.log('onsubmit returns: false'); return false; } else if(t_onsubmit_return == true) { if(fb)console.log('onsubmit returns: true'); } } // submit form $(this).closest('form').submit(); } else { if(fb)console.log('no form found!'); } return false; }); } this.init_binds(); } /**//* ButtonCurrencyChangeHandler.js */ /**/ function ButtonCurrencyChangeHandler() { if(fb)console.log('ButtonCurrencyChangeHandler ready'); this.init_binds = function() { if(fb)console.log('ButtonCurrencyChangeHandler init_binds'); $('.currencies_selection').die('change'); $('.currencies_selection').live('change', function() { if(fb)console.log('.currencies_selection change'); if($(this).closest('form').length > 0) { $(this).closest('form').submit(); } return false; }); } this.init_binds(); } /**/ /* ButtonOpenSearchHandler.js */ /**/ function ButtonOpenSearchHandler() { if(fb)console.log('ButtonOpenSearchHandler ready'); this.init_binds = function() { if(fb)console.log('ButtonOpenSearchHandler init_binds'); $('.button_opensearch').die('click'); $('.button_opensearch').live('click', function() { if(fb)console.log('.button_opensearch click'); /* add open search plugin */ add_opensearch_plugin(); return false; }); } function add_opensearch_plugin() { if(navigator.appVersion.match(/MSIE [7-8]\./) != null || navigator.userAgent.match(/Firefox/i) || navigator.userAgent.match(/Chrome/i)) { var t_opensearch_link = 'https://ctj24.de/export/opensearch_2.xml'; window.external.AddSearchProvider(t_opensearch_link); } else { alert('Die Schnell-Suche ist derzeit nur im Internet Explorer 7 und im Mozilla Firefox verfĂĽgbar.'); } } this.init_binds(); } /**/ /* CartControl.js */ /**/ function CartControl() { if(fb)console.log('CartControl ready'); this.submit_buy_now_form = function(p_form) { var coo_this = this; // handle for callback functions var t_form_data = $(p_form).serialize(); if(fb)console.log('t_form_data: '+ t_form_data); var t_url = 'request_port.php?module=buy_now&XTCsid=' + gm_session_id; $.ajax({ url: t_url, type: 'POST', dataType: 'json', data: t_form_data, success: function(p_result_json) { if(fb)console.log('show_details: ' + p_result_json.show_details); /* 0-0 dropdown 0-1 cart 1-0 details 1-1 details */ // dont redirect. use cart dropdown. if(p_result_json.show_details == false && p_result_json.show_cart == false) { // update cart dropdown coo_this.load_dropdown_content(); } // redirect to cart if(p_result_json.show_details == false && p_result_json.show_cart == true) { //TODO: add session-id document.location.href = 'https://ctj24.de/shopping_cart.php'; } // redirect to product details if(p_result_json.show_details == true) { document.location.href = p_result_json.products_details_url; } } }); } this.load_dropdown_content = function() { var coo_this = this; // handle for callback functions var t_url = ''; var t_close_timeout = false; $( document ).bind( "cart_shipping_costs_info_active", function() { if( t_close_timeout != false ) { clearTimeout( t_close_timeout ); t_close_timeout = false; } }); if(coo_this.need_fixed_cart() == true) { t_url = 'request_port.php?module=cart_dropdown&part=fixed&XTCsid=' + gm_session_id; $.ajax({ type: 'GET', url: t_url, success: function(p_result) { var t_dropdown_html = p_result; // remove old dropdown $('#fixed_dropdown_shopping_cart').remove(); // set loaded dropdown $('.wrap_shop').prepend(t_dropdown_html); // set position coo_this.position_fixed_dropdown(); // show dropdown coo_this.open_fixed_dropdown(); // start timeout for closing the dropdown setTimeout('coo_cart_control.close_fixed_dropdown()', 5000); } }); } // update dropdown content t_url = 'request_port.php?module=cart_dropdown&part=header&XTCsid=' + gm_session_id; $.ajax({ type: 'GET', url: t_url, success: function(p_result) { var t_header_html = p_result; $('#head_shopping_cart').remove(); $('#head_toolbox_inner').prepend(t_header_html); if(coo_this.need_fixed_cart() == false) { // fixed cart not needed, so need to activate dropdown $('#head_shopping_cart').addClass('active'); } } }); // update dropdown content t_url = 'request_port.php?module=cart_dropdown&part=dropdown&XTCsid=' + gm_session_id; $.ajax({ type: 'GET', url: t_url, success: function(p_result) { var t_dropdown_html = p_result; // remove old dropdown $('#dropdown_shopping_cart').remove(); // set loaded dropdown $('.wrap_shop').prepend(t_dropdown_html); // set position coo_this.position_dropdown(); if(coo_this.need_fixed_cart() == false) { // fixed cart not needed, so need to activate dropdown // show dropdown coo_this.open_dropdown(); // start timeout for closing the dropdown t_close_timeout = setTimeout('coo_cart_control.close_dropdown()', 5000); } } }); } this.need_fixed_cart = function() { var t_cart_header = $('#head_shopping_cart'); var t_dropdown_offset_top = $('#container').attr('offsetTop') + $(t_cart_header).attr('offsetTop') + $(t_cart_header).height(); var scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant scrOfY = window.pageYOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant scrOfY = document.body.scrollTop; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode scrOfY = document.documentElement.scrollTop; } if(fb)console.log('offset ' + t_dropdown_offset_top); if(fb)console.log('scrollTop ' + scrOfY); // use fixed position, if dropdown not in viewport if(t_dropdown_offset_top < scrOfY) { if(fb)console.log('use fixed cart dropdown'); return true; } else { if(fb)console.log('use attached cart dropdown'); return false; } } this.open_fixed_dropdown = function() { if(fb)console.log('open_fixed_dropdown'); var t_cart_dropdown = $('#fixed_dropdown_shopping_cart'); $(t_cart_dropdown).slideDown('slow'); } // dont bind closing events, if styleedit is running if(typeof gm_style_edit_mode_running == 'undefined') { this.close_fixed_dropdown = function() { if(fb)console.log('close_fixed_dropdown'); var t_cart_dropdown = $('#fixed_dropdown_shopping_cart'); $(t_cart_dropdown).slideUp(); } } this.position_fixed_dropdown = function() { var t_cart_header = $('#head_shopping_cart'); var t_cart_dropdown = $('#fixed_dropdown_shopping_cart'); // set top relative to dropdown header $(t_cart_dropdown).css('left', $(t_cart_header).offset().left); if(typeof($('body').css('padding-top')) != 'undefined' && $('body').css('padding-top').search('px') != -1) { $(t_cart_dropdown).css('top', '-' + $('body').css('padding-top')); } } this.open_dropdown = function() { if(fb)console.log('open_dropdown'); var t_cart_header = $('#head_shopping_cart'); var t_cart_dropdown = $('#dropdown_shopping_cart'); $(t_cart_header).addClass('active'); $(t_cart_dropdown).slideDown('slow'); } // dont bind closing events, if styleedit is running if(typeof gm_style_edit_mode_running == 'undefined') { this.close_dropdown = function() { if(fb)console.log('close_dropdown'); var t_cart_header = $('#head_shopping_cart'); var t_cart_dropdown = $('#dropdown_shopping_cart'); $(t_cart_header).removeClass('active'); $(t_cart_dropdown).slideUp(); } } this.position_dropdown = function() { var t_cart_header = $('#head_shopping_cart'); var t_cart_dropdown = $('#dropdown_shopping_cart'); var t_top = Number($(t_cart_header).offset().top) + Number($(t_cart_header).height()) + Number($(t_cart_header).css('padding-top').replace('px', '')) + Number($(t_cart_header).css('padding-bottom').replace('px', '')); // set top relative to dropdown header $(t_cart_dropdown).css('left', $(t_cart_header).offset().left).css('top', t_top + 'px'); } } /**//* CartDropdownHandler.js */ /**/ function CartDropdownHandler() { if(fb)console.log('CartDropdownHandler ready'); this.init_binds = function() { if(fb)console.log('CartDropdownHandler init_binds'); //var coo_this = this; t_close_timeout = false; $('#head_shopping_cart').die('click'); $('#head_shopping_cart').live('click', function() { if(fb)console.log('#head_shopping_cart click'); if($(this).hasClass('active') == false) { coo_cart_control.position_dropdown(); coo_cart_control.open_dropdown(); t_close_timeout = setTimeout(coo_cart_control.close_dropdown, 10000); } else { coo_cart_control.close_dropdown() } return true; }); $( document ).bind( "cart_shipping_costs_info_active", function() { if( t_close_timeout != false ) { clearTimeout( t_close_timeout ); t_close_timeout = false; } }); } this.init_binds(); } /**/ /* InputEnterKeyHandler.js */ /**/ function InputEnterKeyHandler() { if(fb)console.log('InputEnterKeyHandler ready'); var v_last_key = 0; var v_last_key_down = 0; var v_ctrl_v = false; var v_last_char_count = 0; var v_arrow_key_pressed = false; var v_keydown = false; this.init_binds = function() { if(fb)console.log('InputEnterKeyHandler init_binds'); $('input').live('keyup', function(event) { var t_keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode)); if($(this).closest('form').find('.action_submit').length > 0) { // track enter key if(t_keycode == 13 && ((Math.abs($(this).val().length - v_last_char_count) <= 1 || v_ctrl_v == true) || v_last_key == 0)) // 13 keycode for enter key { // abort submit because input-field browser-suggestion was confirmed and no form submit was executed if(v_arrow_key_pressed || v_keydown == false) { return false; } if(typeof($(this).closest('form').attr('onsubmit')) == 'string') { if(fb)console.log('found onsubmit in form-tag!'); var t_onsubmit = $(this).closest('form').attr('onsubmit').replace('return ', ''); var t_onsubmit_return = eval(t_onsubmit); if(fb)console.log('onsubmit evaluated'); if(t_onsubmit_return == false) { if(fb)console.log('onsubmit returns: false'); return false; } else if(t_onsubmit_return == true) { if(fb)console.log('onsubmit returns: true'); } } $(this).closest('form').submit(); return false; } else if(t_keycode == 13) { v_keydown = false; v_arrow_key_pressed = false; } v_last_key = t_keycode; v_last_char_count = $(this).val().length; } else { if(fb)console.log('no ".action_submit" button found'); } return true; }); $('input').live('keydown', function(event) { var t_keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode)); if(t_keycode != 13) { v_ctrl_v = false; } if(v_last_key_down == 17) // key: CTRL { if(t_keycode == 86) // key: v { v_ctrl_v = true; } } if(v_last_key == 37 || v_last_key == 38 || v_last_key == 39 || v_last_key == 40) // 37-40 keycode for arrow-keys { v_arrow_key_pressed = true; } v_last_key_down = t_keycode; v_keydown = true; }); } this.init_binds(); } /**/ /* PullDownLinkHandler.js */ /**/ function PullDownLinkHandler() { if(fb)console.log('PullDownLinkHandler ready'); var coo_clicked_ids = Object(); var coo_clicked_elements = Object(); var coo_this = this; var t_allow_close_all = true; this.init_binds = function() { if(fb)console.log('PullDownLinkHandler init_binds'); $('.pulldown_link').die('click'); $('.pulldown_link').live('click', function() { if(fb)console.log('.pulldown_link click'); coo_this.start(this); return false; }); } this.start = function(p_element) { var t_container = $(p_element).attr('rel'); // open menu if($(t_container).css('display') == 'none'){ // hide opened dropdowns belonging to the div-container where the clicked link is placed in if($(p_element).closest('div[id]').attr('id').length > 0) { $('#' + $(p_element).closest('div[id]').attr('id') + ' a').each(function() { if($(this).attr('rel').length > 0) { if(typeof(coo_clicked_ids[$(this).attr('rel')]) == 'number') { clearTimeout(coo_clicked_ids[$(this).attr('rel')]); } $($(this).attr('rel')).slideUp(); } }); } var t_top = Number($(p_element).offset().top) + Number($(p_element).height()) + Number($(p_element).css('padding-top').replace('px', '')) + Number($(p_element).css('padding-bottom').replace('px', '')); $(t_container).css('left', $(p_element).offset().left).css('top', t_top + 'px').slideDown(); if($(p_element).hasClass('pulldown_link_no_auto_close') == false && typeof(gm_style_edit_mode_running) == 'undefined') { coo_clicked_ids[t_container] = setTimeout("$('" + t_container + "').slideUp()", 3000); } } // close menu else { if(typeof(coo_clicked_ids[t_container]) == 'number') { clearTimeout(coo_clicked_ids[t_container]); } $(t_container).slideUp(); } // stop menu sliding up by clicking into it $(t_container).die('click'); $(t_container).live('click', function() { t_allow_close_all = false; coo_clicked_elements[t_container] = true; if(typeof(coo_clicked_ids[t_container]) == 'number') { clearTimeout(coo_clicked_ids[t_container]); } }); // stop menu sliding up on mouseenter $(t_container).die('mouseenter'); $(t_container).live('mouseenter', function() { if(fb)console.log(t_container + ': mouseenter'); t_allow_close_all = false; if(typeof(coo_clicked_ids[t_container]) == 'number') { clearTimeout(coo_clicked_ids[t_container]); } }); // start timeout for sliding up menu $(t_container).die('mouseleave'); $(t_container).live('mouseleave', function() { if(fb)console.log(t_container + ': mouseleave'); t_allow_close_all = true; if(typeof(coo_clicked_ids[t_container]) == 'number' && typeof(coo_clicked_elements[t_container]) == 'undefined') { clearTimeout(coo_clicked_ids[t_container]); coo_clicked_ids[t_container] = setTimeout("$('" + t_container + "').slideUp()", 3000); } }); $('.wrap_shop').die('click', coo_this.close_all); $('.wrap_shop').live('click', coo_this.close_all); } this.close_all = function() { if(fb)console.log('PullDownLinkHandler close_all allowed: ' + t_allow_close_all); var t_element = ''; for(t_element in coo_clicked_ids) { clearTimeout(coo_clicked_ids[t_element]); if($(t_element).length > 0 && t_allow_close_all == true) { $(t_element).slideUp(); } } // reset if(t_allow_close_all == true) { coo_clicked_ids = Object(); coo_clicked_elements = Object(); $('.wrap_shop').die('click', this.close_all); } } this.init_binds(); } /**/ /* ResetFormHandler.js */ /**/ function ResetFormHandler() { if(fb)console.log('ResetFormHandler ready'); this.init_binds = function() { if(fb)console.log('ResetFormHandler init_binds'); $('.button_reset_form').die('click'); $('.button_reset_form').live('click', function() { if(fb)console.log('.button_reset_form click'); if($(this).closest('form').length > 0) { // reset form $(this).closest('form').find(':input').each(function() { switch(this.type) { case 'password': case 'select-multiple': case 'select-one': case 'text': case 'textarea': $(this).val(''); break; case 'checkbox': case 'radio': this.checked = false; } }); // TODO: better solution for executing onsubmit functions // and regarding return value -> stop submit in false-case if(typeof($(this).closest('form').attr('onsubmit')) == 'string') { if(fb)console.log('found onsubmit in form-tag!'); var t_onsubmit = $(this).closest('form').attr('onsubmit').replace('return ', ''); var t_onsubmit_return = eval(t_onsubmit); if(fb)console.log('onsubmit evaluated'); if(t_onsubmit_return == false) { if(fb)console.log('onsubmit returns: false'); return false; } else if(t_onsubmit_return == true) { if(fb)console.log('onsubmit returns: true'); } } // submit form $(this).closest('form').submit(); } else { if(fb)console.log('no form found!'); } return false; }); } this.init_binds(); } /**//* */ /**/ (function($){ $.fn.slider_plugin = function(){ var slider_id = $("#jcarousel_slider_id").val(); var li_width = parseInt(js_options.slider_plugin[slider_id].width); var ul_children_length = 0; var big_image_nr; var prev_image_nr; var count_steps; var active_animation = false; var timeout; ul_children_length = $("#jcarousel_image_box ul").children("li").length; $("#jcarousel_image_box ul").width((ul_children_length)*li_width); $("#jcarousel_image_box").scrollLeft((ul_children_length/2)*li_width); $("#slideImg_1").addClass("jcarousel_control_a_active"); if($(".jcarousel-control a").length > 1){ var control_pos = js_options.slider_plugin[slider_id].control_position.split("_"); switch(control_pos[0]){ case "top": $(".jcarousel-control").css("top", js_options.slider_plugin[slider_id].control_margin).css("bottom", ""); break; default: $(".jcarousel-control").css("top", "").css("bottom", js_options.slider_plugin[slider_id].control_margin); break; } switch(control_pos[1]){ case "left": $(".jcarousel-control").css("right", "").css("left", js_options.slider_plugin[slider_id].control_margin); break; case "center": $(".jcarousel-control").css("right", js_options.slider_plugin[slider_id].control_margin).css("left", js_options.slider_plugin[slider_id].control_margin); $(".jcarousel-control").css("text-align", "center"); break; default: $(".jcarousel-control").css("right", js_options.slider_plugin[slider_id].control_margin).css("left", ""); break; } $(".jcarousel-control a").css("visibility", "visible"); } if(ul_children_length > 2 && js_options.global.style_edit_mode != "edit"){ timeout = setTimeout(function(){ update_view(1); }, js_options.slider_plugin[slider_id].slider_speed); } if(js_options.global.style_edit_mode != "edit"){ $(this).bind("mouseover", function(){ if(js_options.slider_plugin[slider_id].stop_on_mouseover == true){ clearTimeout(timeout); } }); $(this).bind("mousemove", function(){ if(js_options.slider_plugin[slider_id].stop_on_mouseover == true){ clearTimeout(timeout); } }); $(this).bind("mouseleave", function(){ if(active_animation == false && js_options.slider_plugin[slider_id].stop_on_mouseover == true && ul_children_length > 2){ timeout = setTimeout( function(){ if($("#slider_flyover_container").length == 0){ update_view(1); } }, js_options.slider_plugin[slider_id].slider_speed); } }); $("#jcarousel_box .jcarousel-control a").click(function(){ var actual_children = $("#jcarousel_image_box ul").children("li"); var tmp_big_image_nr = $(actual_children[ul_children_length/2]).find("img").attr("id").split("_"); big_image_nr = parseInt(tmp_big_image_nr[1]); var tmp_prev_image_nr = $(this).attr("id").split('_'); prev_image_nr = parseInt(tmp_prev_image_nr[1]); if(active_animation == false && big_image_nr != prev_image_nr) { clearTimeout(timeout); if(prev_image_nr > big_image_nr){ count_steps = prev_image_nr - big_image_nr; }else{ count_steps = prev_image_nr - big_image_nr; } update_view(count_steps); } return false; }); } function update_view(steps){ active_animation = true; var tmp_steps = 0; if(steps > 0){ tmp_steps = steps; }else{ tmp_steps = steps*(-1); } $("#slider_flyover_container").hide(); $("#jcarousel_image_box").animate({ scrollLeft: li_width*(ul_children_length/2+steps) },{ duration: js_options.slider_plugin[slider_id].animation_speed/tmp_steps, easing: 'linear', complete: function(){ var actual_children = []; for(var i = 0; i < tmp_steps; i++){ if(steps > 0){ $("#jcarousel_image_box ul").append($("#jcarousel_image_box ul").find("li:first-child").detach()); $("#jcarousel_image_box").scrollLeft($("#jcarousel_image_box").scrollLeft()-li_width); }else{ $("#jcarousel_image_box ul").prepend($("#jcarousel_image_box ul").find("li:last-child").detach()); $("#jcarousel_image_box").scrollLeft($("#jcarousel_image_box").scrollLeft()+li_width); } } actual_children = $("#jcarousel_image_box ul").children("li"); $("#jcarousel_box .jcarousel-control a").removeClass("jcarousel_control_a_active"); var tmp_big_image_nr = $(actual_children[ul_children_length/2]).find("img").attr("id").split("_"); big_image_nr = parseInt(tmp_big_image_nr[1]); $("#slideImg_"+big_image_nr).addClass("jcarousel_control_a_active"); active_animation = false; timeout = setTimeout(function(){ update_view(1); }, js_options.slider_plugin[slider_id].slider_speed); } }); } }; })(jQuery); (function($){ $.fn.slider_flyover_content = function(){ var flyover_timeout; var mouse_pos_x; var mouse_pos_y; var actual_area_id; var request; $.each(this, function(){ var self = this; $(self).bind("mouseenter", function(){ clearTimeout(flyover_timeout); if($("#slider_flyover_container").length == 0){ var slider_flyover_container = $("
").attr("id", "slider_flyover_container"); $("body").append(slider_flyover_container); } $(self).unbind("mousemove"); $(self).bind("mousemove", function(e){ mouse_pos_x = e.pageX; mouse_pos_y = e.pageY; }); var id = $(self).attr("id").split("_"); actual_area_id = id[1]; if(actual_area_id != $("#slider_flyover_container").attr("class")){ if(request){ request.abort(); } request = $.ajax({ type: "POST", url: "request_port.php?module=Slider", async: true, data: {"action": "get_flyover_content", "slider_image_area_id": actual_area_id}, success: function(response){ var id = $(self).attr("id").split("_"); if(id[1] == actual_area_id && $.trim(response) != "" && $.trim(response.replace(/
/g, "")) != ""){ $("#slider_flyover_container").addClass(actual_area_id); $("#slider_flyover_container").html(response); $("#slider_flyover_container").css("left", mouse_pos_x); $("#slider_flyover_container").css("top", mouse_pos_y); if((mouse_pos_x-$(document).scrollLeft() + $("#slider_flyover_container").width()+30) >= $(window).width()){ $("#slider_flyover_container").css("left", mouse_pos_x-$("#slider_flyover_container").width()-20); } if((mouse_pos_y-$(document).scrollTop() + $("#slider_flyover_container").height()+30) >= $(window).height()){ $("#slider_flyover_container").css("top", mouse_pos_y-$("#slider_flyover_container").height()-20); } $("#slider_flyover_container").show(); } } }); } }); $(self).bind("mouseleave", function(){ actual_area_id = 0; flyover_timeout = setTimeout(remove_container, 50); }); $("#slider_flyover_container").live("mouseenter", function(){ var id = $(self).attr("id").split("_"); actual_area_id = id[1]; clearTimeout(flyover_timeout); }); $("#slider_flyover_container").live("mouseleave", function(){ actual_area_id = 0; flyover_timeout = setTimeout(remove_container, 50); }); function remove_container(){ if(actual_area_id == 0){ if(request){ request.abort(); } $("#slider_flyover_container").remove(); } } }); }; })(jQuery); $(document).ready(function() { if($("#jcarousel_box").length == 1){ $("#jcarousel_box").slider_plugin(); $("#jcarousel_box area").slider_flyover_content(); } }); /**/ /* TopNavigationHandler.js */ /**/ function TopNavigationHandler() { if(fb)console.log('TopNavigationHandler ready'); this.init_binds = function() { if(fb)console.log('TopNavigationHandler init_binds'); var t_background_color_hover = 'transparent'; $('#top_navi_inner ul li a').die('hover'); $('#top_navi_inner ul li a').live('hover', function() { if($(this).css('background-color') != 'transparent') { t_background_color_hover = $(this).css('background-color'); } }); $('#top_navi_inner ul li').die('mouseleave'); $('#top_navi_inner ul li').live('mouseleave', function() { $('#top_navi_inner ul li a').removeAttr('style'); }); $('#top_navi_inner ul li div').die('mouseenter'); $('#top_navi_inner ul li div').live('mouseenter', function() { if(t_background_color_hover != '') { $(this).next('a').css('background-color', t_background_color_hover); } }); $('#top_navi_inner ul li div').die('click'); $('#top_navi_inner ul li div').live('click', function() { if(typeof($(this).next('a').attr('rel')) == 'undefined' || $(this).next('a').attr('rel').length == 0) { document.location.href = $(this).next('a').attr('href'); return false; } else { // open pull down menu $(this).next('a').trigger('click'); } }); } this.init_binds(); } /**//* */ /**/ (function($){ $.fn.social_share_plugin = function(){ var self = $(this); var v_location = $(location).attr('href').replace(/[&]*XTCsid(=|\/)[a-zA-Z0-9,-]+/g, ''); v_location = v_location.replace(/\?&/g, '?'); v_location = v_location.replace(/\?$/g, ''); var v_location_encoded = encodeURIComponent(v_location); var v_product_image = encodeURIComponent(js_options.global.shop_root + $("#product_info .info_image_box img").attr('src')); var v_product_text = js_options.global.shop_name + ' - ' + $.trim($("#product_info .info h1").html() + ' '); $.each(self, function(){ $(this).bind("click", function(){ update_view(this); }); return this; }); function update_view(p_element){ var t_image = ""; var t_code = ""; if($(p_element).parent().hasClass("switch_on")){ $(p_element).parent().removeClass("switch_on"); t_image = 'js_options.social_share.'+$(p_element).parent().attr('id')+'.image'; $(p_element).parent().find(".social_share_content").html(eval(t_image)); }else{ $(p_element).parent().addClass("switch_on"); t_code = 'js_options.social_share.'+$(p_element).parent().attr('id')+'.code'; t_code = eval(t_code); t_code = t_code.replace('#text#', v_product_text); t_code = t_code.replace('#product_image#', v_product_image); t_code = t_code.replace('#location#', v_location); t_code = t_code.replace('#location_encoded#', v_location_encoded); $(p_element).parent().find(".social_share_content").html(t_code); } } }; })(jQuery); $(document).ready(function() { if($(".social_share_image").length > 0){ $(".social_share_image").social_share_plugin(); } }); /**//* InputDefaultValueHandler.js */ /**/ function InputDefaultValueHandler() { if(fb)console.log('InputDefaultValueHandler ready'); var t_input_array = new Array(); var coo_this = this; this.init_binds = function() { if(fb)console.log('InputDefaultValueHandler init_binds'); var t_search_field_value = ''; $('.default_value').die('click'); $('.default_value').live('click', function() { if(fb)console.log('.default_value click'); var t_check = coo_this.in_array(t_input_array, this); var t_key = t_check; if(typeof(t_check) == 'boolean' && t_check == false) { t_key = t_input_array.length; t_input_array[t_key] = new Object(); t_input_array[t_key]['ELEMENT'] = this; t_input_array[t_key]['VALUE'] = $(this).val(); } if($(this).val() != '') { t_search_field_value = $(this).val(); } if(t_search_field_value == t_input_array[t_key]['VALUE']) { $(this).val(''); } }); $('.default_value').die('blur'); $('.default_value').live('blur', function() { if(fb)console.log('.default_value blur'); if($(this).val().replace(/\s+/, '') == '') { var t_key = coo_this.in_array(t_input_array, this); $(this).val(t_input_array[t_key]['VALUE']); } }); } this.in_array = function(p_array, p_needle) { var t_found = false; if(typeof(p_array) == 'object') { for(var i = 0; i < p_array.length; i++) { if(p_array[i]['ELEMENT'] == p_needle) { t_found = i; } } } return t_found; } this.init_binds(); } /**/ /* LiveSearchHandler.js */ /**/ function LiveSearchHandler() { if(fb)console.log('LiveSearchHandler ready'); var coo_this = this; var t_ie6_elements_array = Array(); this.init_binds = function() { if(fb)console.log('LiveSearchHandler init_binds'); if($('#search_field').length > 0) { $('.wrap_shop').prepend(''); var t_offset_top = Number($('#search_field').offset().top); var t_height = 0; if(typeof($('#search_field').css('height')) != 'undefined') { t_height = Number($('#search_field').css('height').replace('px', '')); } var t_border_top_width = 0; if(typeof($('#search_field').css('border-top-width')) != 'undefined') { t_border_top_width = Number($('#search_field').css('border-top-width').replace('px', '')); } var t_padding_top = 0; if(typeof($('#search_field').css('padding-top')) != 'undefined') { t_padding_top = Number($('#search_field').css('padding-top').replace('px', '')); } var t_padding_bottom = 0; if(typeof($('#search_field').css('padding-bottom')) != 'undefined') { t_padding_bottom = Number($('#search_field').css('padding-bottom').replace('px', '')); } var t_top = t_offset_top + t_height + t_border_top_width + t_padding_top + t_padding_bottom; $('#live_search_container').css( { left: $('#search_field').offset().left, top: t_top + 'px' }); $('#live_search_container').css('border-color', $('#search_field').css('border-left-color')); $('#live_search_container').css('border-style', $('#search_field').css('border-left-style')); $('#live_search_container').css('border-width', $('#search_field').css('border-left-width')); $('#live_search_container').css('padding-left', $('#search_field').css('padding-left')); $('#live_search_container').css('padding-right', $('#search_field').css('padding-right')); // IE-Fix: $('#live_search_container ul li').live('click', function() { window.location.href = $(this).find('a').attr('href'); return false; }); $('#search_field').live('keyup', function(event) { if(fb)console.log('search_field keyup'); var t_needle = encodeURIComponent( $('#search_field').attr('value') ); if(t_needle.length > 2) { jQuery.ajax( { data: '', url: 'request_port.php?module=live_search&needle=' + t_needle + '&XTCsid=' + gm_session_id, type: "POST", async: true, success: function(t_search_result_html) { if(t_search_result_html != '') { coo_this.show_result(t_search_result_html); } else { coo_this.hide_result(); } } }).html; } else { coo_this.hide_result(); } }); $('.wrap_shop').die('click', coo_this.hide_result); $('.wrap_shop').live('click', coo_this.hide_result); } } this.hide_result = function() { $('#live_search_container').html(''); $('#live_search_container').hide(); if(navigator.appVersion.match(/MSIE [0-6]\./)) { coo_this.ie6_fix(false); } } this.show_result = function(p_html_content) { if(navigator.appVersion.match(/MSIE [0-6]\./)) { coo_this.ie6_fix(true); } $('#live_search_container').html(p_html_content); $('#live_search_container').show(); } this.ie6_fix = function(p_hide) { if(p_hide) { $('select').each(function() { if($(this).css('visibility') != 'hidden' && $(this).css('display') != 'none') { t_ie6_elements_array.push(this); $(this).css( { visibility: 'hidden' }); } }); } else { for(var i = 0; i < t_ie6_elements_array.length; i++) { $(t_ie6_elements_array[i]).css( { visibility: 'visible' }); } } } this.init_binds(); } /**/ /* SubmenuHandler.js */ /**/ function SubmenuHandler(p_delay_open, p_delay_close) { if(fb)console.log('SubmenuHandler ready'); this.v_delay_open = 250; // unit: ms if(typeof(p_delay_open) != 'undefined') { this.v_delay_open = this.clear_number(p_delay_open); } this.v_delay_close = 500; // unit: ms if(typeof(p_delay_close) != 'undefined') { this.v_delay_close = this.clear_number(p_delay_close); } this.v_parent_ids_array = Array(); this.v_z_index = 500; var coo_this = this; var v_visible_menu_ids_array = Array(); var v_timeout_open = 0; var v_timeout_close = 0; var v_active_element = ''; var v_inactive_submenus_shown = false; var v_allow_close_all = true; this.init_binds = function() { if(fb)console.log('SubmenuHandler init_binds'); this.ie6_fix(); this.v_parent_ids_array = this.push_id(0, this.v_parent_ids_array); this.find_loaded_submenus(); $('.wrap_shop').die('click', coo_this.close_all); $('.wrap_shop').live('click', function(){coo_this.close_all(true)}); $('.submenu li img').die('click', coo_this.open_link); $('.submenu li img').live('click', coo_this.open_link); $('.submenu li').die('mouseenter'); $('.submenu li').live('mouseenter', function() { if(fb)console.log('.submenu li mouseenter'); // clear title obscuring the menu $(this).find('a').attr('title', ''); v_allow_close_all = false; clearTimeout(v_timeout_close); v_active_element = $(this).attr('id'); var t_coo_this = this; if(v_inactive_submenus_shown == true) { v_timeout_open = setTimeout(function(){coo_this.open_menu(t_coo_this)}, coo_this.v_delay_open); } // ignore open_delay if there are no submenus that could be left accidentally else { if(fb)console.log('SubmenuHandler open_delay ignored') coo_this.open_menu(t_coo_this); } }); $('.submenu li').die('mouseleave'); $('.submenu li').live('mouseleave', function() { if(fb)console.log('.submenu li mouseleave'); clearTimeout(v_timeout_open); v_active_element = ''; }); $('.submenu').die('mouseleave'); $('.submenu').live('mouseleave', function() { if(fb)console.log('.submenu mouseleave'); v_allow_close_all = true; if(typeof(gm_style_edit_mode_running) == 'undefined') { v_timeout_close = setTimeout(coo_this.close_all, coo_this.v_delay_close); } }); } this.open_menu = function(p_coo_this) { if(typeof($(p_coo_this).closest('.submenu').attr('id')) != 'undefined') { var t_parents_id = 0; if($(p_coo_this).closest('.submenu').attr('id').search('submenu_box_id_') != -1) { t_parents_id = $(p_coo_this).closest('.submenu').attr('id').replace('submenu_box_id_', ''); } if(fb)console.log('.submenu li: parents_id ' + t_parents_id); if(t_parents_id == 0) { $('.content-box.categories.submenu ul li a.active').removeClass('active'); } else { $('#submenu_box_id_' + t_parents_id + ' ul li a.active').removeClass('active'); } $(p_coo_this).find('a').addClass('active'); var t_categories_id = 0; if($(p_coo_this).attr('id').search('menu_cat_id_') != -1) { t_categories_id = $(p_coo_this).attr('id').replace('menu_cat_id_', ''); } if(fb)console.log('.submenu li: categories_id ' + t_categories_id); coo_this.get_submenus_by_categories_id(t_parents_id, t_categories_id); } } this.get_submenus_by_categories_id = function(p_parents_id, p_categories_id) { c_parents_id = this.clear_number(p_parents_id); c_categories_id = this.clear_number(p_categories_id); var t_already_loaded = this.in_array(c_parents_id, this.v_parent_ids_array); if(t_already_loaded == false) { jQuery.ajax( { data: 'module=submenus&id=' + c_parents_id + '&XTCsid=' + gm_session_id, url: 'request_port.php', type: "GET", async: true, success: function(t_submenus_html) { t_already_loaded = coo_this.in_array(c_parents_id, coo_this.v_parent_ids_array); if(t_already_loaded == false) { $('.wrap_shop:first').prepend(t_submenus_html); coo_this.ie6_fix(); coo_this.v_parent_ids_array = coo_this.push_id(c_parents_id, coo_this.v_parent_ids_array); } coo_this.load_submenu(c_categories_id); } }).html; } else { coo_this.load_submenu(c_categories_id); } } this.load_submenu = function(p_categories_id) { if(typeof(p_categories_id) == 'undefined' || p_categories_id == 0 || isNaN(p_categories_id)) { return false; } this.v_z_index++; var t_top = $('#menu_cat_id_' + p_categories_id).offset().top; var t_left = $('#menu_cat_id_' + p_categories_id).offset().left + document.getElementById('menu_cat_id_' + p_categories_id).offsetWidth; var t_border_top_width = 0; if(typeof($('.submenu[id^="submenu_box_id_"]:first').find('div:first').css('border-top-width')) != 'undefined') { if(isNaN($('.submenu[id^="submenu_box_id_"]:first').find('div:first').css('border-top-width').replace('px', ''))) { t_border_top_width = 0; } else { t_border_top_width = Number($('.submenu[id^="submenu_box_id_"]:first').find('div:first').css('border-top-width').replace('px', '')); } } t_top -= t_border_top_width; var t_padding_top = 0; if(typeof($('.submenu[id^="submenu_box_id_"]:first').find('div:first').css('padding-top')) != 'undefined') { if(isNaN($('.submenu[id^="submenu_box_id_"]:first').find('div:first').css('padding-top').replace('px', ''))) { t_padding_top = 0; } else { t_padding_top = Number($('.submenu[id^="submenu_box_id_"]:first').find('div:first').css('padding-top').replace('px', '')); } } t_top -= t_padding_top; var t_padding_left = 0; if(typeof($('#menu_cat_id_' + p_categories_id).closest('div').css('padding-top')) != 'undefined') { t_padding_left = Number($('#menu_cat_id_' + p_categories_id).closest('div').css('padding-left').replace('px', '')); } var t_padding_right = 0; if(typeof($('#menu_cat_id_' + p_categories_id).closest('div').css('padding-bottom')) != 'undefined') { t_padding_right = Number($('#menu_cat_id_' + p_categories_id).closest('div').css('padding-right').replace('px', '')); } t_left += t_padding_left + t_padding_right - 2; if(this.is_submenu(p_categories_id) == false) { t_left += 7; } $('#submenu_box_id_' + p_categories_id).closest('.submenu_container').css( { 'z-index': this.v_z_index, top: t_top, left: t_left }); this.reset_visible_menu_ids(); this.set_visible_menu_ids(p_categories_id); for(var i = 0; i < v_visible_menu_ids_array.length; i++) { if(fb)console.log(v_visible_menu_ids_array[i]); } this.show_submenu(p_categories_id); } this.show_submenu = function(p_categories_id) { var c_categories_id = this.clear_number(p_categories_id); $('#submenu_box_id_' + c_categories_id).closest('.submenu_container').show(); v_visible_menu_ids_array = this.push_id('submenu_box_id_' + c_categories_id, v_visible_menu_ids_array); // hide menus not belonging to the last opened menu $('.submenu').each(function() { if($(this).attr('id') != '' && coo_this.in_array($(this).attr('id'), v_visible_menu_ids_array) == false) { $(this).closest('.submenu_container').hide(); // reset styles $(this).find('ul li a.active').removeClass('active'); } }); // remove highlight-class (active) from submenus of current hovered menu entry v_inactive_submenus_shown = false; var current_z_index = 0; if(typeof($('#menu_cat_id_' + c_categories_id).closest('.submenu_container').css('z-index')) != 'undefined' && $('#menu_cat_id_' + c_categories_id).closest('.submenu_container').css('z-index') != 'auto') { current_z_index = Number($('#menu_cat_id_' + c_categories_id).closest('.submenu_container').css('z-index')); } for(var i = 0; i < v_visible_menu_ids_array.length; i++) { if(current_z_index < ($('#' + v_visible_menu_ids_array[i]).closest('.submenu_container').css('z-index'))) { $('#' + v_visible_menu_ids_array[i] + ' ul li a.active').removeClass('active'); v_inactive_submenus_shown = true; } } } this.set_visible_menu_ids = function(p_categories_id) { var c_categories_id = this.clear_number(p_categories_id); if($('#menu_cat_id_' + c_categories_id).closest('.submenu').attr('id') != '') { var t_submenu_box_id = $('#menu_cat_id_' + c_categories_id).closest('.submenu').attr('id'); if(typeof(t_submenu_box_id) != 'undefined') { v_visible_menu_ids_array = this.push_id(t_submenu_box_id, v_visible_menu_ids_array); t_categories_id = t_submenu_box_id.replace('submenu_box_id_', ''); if(t_categories_id != '0') { this.set_visible_menu_ids(t_categories_id); } } } } this.reset_visible_menu_ids = function() { v_visible_menu_ids_array = Array(); } this.in_array = function(p_needle, p_haystack_array) { var t_found = false; for(var i = 0; i < p_haystack_array.length; i++) { if(p_haystack_array[i] == p_needle) { t_found = true; break; } } return t_found; } this.push_id = function(p_id, p_array) { if(this.in_array(p_id, p_array) == false) { p_array.push(p_id); } return p_array; } this.clear_number = function(p_number) { c_number = 0; if(typeof(p_number) != 'undefined' || isNaN(p_number) == false) { c_number = Number(p_number); } return c_number; } this.close_all = function(p_close_by_click) { if(fb)console.log('SubmenuHandler close_all'); if(typeof(p_close_by_click) == 'undefined') { p_close_by_click = false; } if(p_close_by_click == true) { if(v_allow_close_all == true) { clearTimeout(v_timeout_close); $('.submenu[id^="submenu_box_id_"]').closest('.submenu_container').hide(); $('.submenu ul li a.active').removeClass('active'); $('.wrap_shop').die('click', this); } } else { clearTimeout(v_timeout_close); $('.submenu[id^="submenu_box_id_"]').closest('.submenu_container').hide(); $('.submenu ul li a.active').removeClass('active'); } } this.is_submenu = function(p_parent_id) { var t_is_submenu = false; var c_parent_id = 0; if(isNaN(p_parent_id)) { c_parent_id = p_parent_id.replace(/[^\d]+/g, ''); if(isNaN(c_parent_id)) { if(fb)console.log('SubmenuHandler is_submenu(): wrong parameter "' + p_parent_id + '"'); return false; } } else { c_parent_id = p_parent_id; } // check if it is a submenu if(typeof($('#menu_cat_id_' + c_parent_id).closest('.submenu')) == 'object' && $('#menu_cat_id_' + c_parent_id).closest('.submenu').attr('id').search('submenu_box_id_') != -1) { t_is_submenu = true; } return t_is_submenu; } this.find_loaded_submenus = function() { var submenu_box_id = ''; var parent_id = ''; $('div[id^="submenu_box_id_"]').each(function() { submenu_box_id = $(this).attr('id').replace('submenu_box_id_', ''); if($('#menu_cat_id_' + submenu_box_id).length > 0) { parent_id = $('#menu_cat_id_' + submenu_box_id).closest('.submenu').attr('id').replace('submenu_box_id_', ''); coo_this.v_parent_ids_array = coo_this.push_id(parent_id, coo_this.v_parent_ids_array); } }); } this.open_link = function() { if(fb)console.log('.submenu li img click, open link: ' + $(this).closest('li').find('a:first').attr('href')); location.href = $(this).closest('li').find('a:first').attr('href'); return true; } // IE6 needs fixed width for outer div-block '.submenu_container' calculated by inner div-blocks paddings // ('.submenu', '.submenu div:first') and width of '.submenu ul li' (only set in IE6) this.ie6_fix = function() { if(navigator.appVersion.match(/MSIE [0-6]\./)) { var t_paddings = 0; if(typeof($('.submenu_container .submenu').css('padding-left')) != 'undefined' && $('.submenu_container .submenu').css('padding-left').search('px') != -1) { t_paddings += Number($('.submenu_container .submenu').css('padding-left').replace('px', '')); } if(typeof($('.submenu_container .submenu').css('padding-right')) != 'undefined' && $('.submenu_container .submenu').css('padding-right').search('px') != -1) { t_paddings += Number($('.submenu_container .submenu').css('padding-right').replace('px', '')); } if(typeof($('.submenu_container .submenu div:first').css('padding-left')) != 'undefined' && $('.submenu_container .submenu div:first').css('padding-left').search('px') != -1) { t_paddings += Number($('.submenu_container .submenu div:first').css('padding-left').replace('px', '')); } if(typeof($('.submenu_container .submenu div:first').css('padding-right')) != 'undefined' && $('.submenu_container .submenu div:first').css('padding-right').search('px') != -1) { t_paddings += Number($('.submenu_container .submenu div:first').css('padding-right').replace('px', '')); } if(typeof($('.submenu_container .submenu ul li').css('width')) != 'undefined' && $('.submenu_container .submenu ul li').css('width').search('px') != -1) { var t_width = Number($('.submenu_container .submenu ul li').css('width').replace('px', '')); t_width += t_paddings; $('.submenu_container').css('width', t_width + 'px'); } } } this.init_binds(); } /**/ /* GMAskOpensearch.js */ /**/ function GMAskOpensearch() { $(document).ready( function() { if(typeof gm_style_edit_mode_running == 'undefined') { gmOpenSearch.bind_flyover(); } } ); this.bind_flyover = function() { $('.gm_opensearch_info').mouseover(function(event) { if(fb)console.log('gm_opensearch_info mouseover'); $('#flyover_layer').remove(); $('.wrap_shop').append('
'); $('#flyover_layer').css({ zIndex: "100", position: "absolute", left: event.pageX + 5, top: event.pageY + 5 }); $('#flyover_layer').load('gm_opensearch.php'); }); $('.gm_opensearch_info').mouseout(function(event) { if(fb)console.log('gm_opensearch mouseout'); $('#flyover_layer').remove(); }); $('.gm_opensearch_info').mousemove(function(event) { $('#flyover_layer').css({ zIndex: "100", position: "absolute", left: event.pageX + 5, top: event.pageY + 5 }); }); } } /**/ /* GMMegaFlyOver.js */ /**/ function GMMegaFlyOver(p_slideshow) { var coo_this = this; var t_timeout = 0; var t_interval = 0; var t_slideshow = p_slideshow; var coo_event = new Object(); var t_mouse_over_element_id = ''; var t_request_timeout = 0; var t_max_image_check_loops = 100; var t_image_check_loops = 0; this.bind_styleedit_mode = function() { $('#flyover_layer').remove(); $('.wrap_shop').append('
'); $('#flyover_layer').css({ zIndex: "100", position: "absolute", display: "none" }); $('#flyover_layer').load('request_port.php?module=mega_flyover&mf_products_id=0&XTCsid='+gm_session_id); $('.flyover_item').mouseover(function(event) { if(fb)console.log('flyover_item mouseover (SE mode)'); $('#flyover_layer').css({ left: event.pageX + 5, top: event.pageY + 5, display: "block" }); }); $('.flyover_item').mousemove(function(event) { $('#flyover_layer').css({ left: event.pageX + 5, top: event.pageY + 5 }); }); } this.bind_flyover = function() { $('.flyover_item').die('mousemove'); $('.flyover_item').live('mousemove', function(event) { coo_event = event; coo_this.position_flyover(event); }); $('.flyover_item').die('mouseover'); $('.flyover_item').live('mouseover', function(event) { if(fb)console.log('flyover_item mouseover'); var t_this_element = this; if(typeof($(this).find('img').attr('alt')) != 'undefined') { $(this).find('img').attr('alt', ''); } if(typeof($(this).find('img').attr('title')) != 'undefined') { $(this).find('img').attr('title', ''); } $('#flyover_layer').remove(); $('.wrap_shop').append('
'); $('#flyover_layer').css({ zIndex: "100", position: "absolute", left: event.pageX + 5, top: event.pageY + 5 }); $('#flyover_layer').hide(); var products_id = $(this).attr('id'); products_id = products_id.split('_'); products_id = products_id.pop(); if(fb)console.log('products_id: ' + products_id); t_mouse_over_element_id = products_id; $(this).unbind('mouseout'); $(this).mouseout(function(event) { if(fb)console.log('flyover_item mouseout: ' + products_id); t_mouse_over_element_id = ''; clearTimeout(t_request_timeout); clearInterval(t_interval); }); clearTimeout(t_request_timeout); t_request_timeout = setTimeout(function(){coo_this.start_request(t_mouse_over_element_id);}, 100); }); } this.start_request = function(p_mouse_over_element_id) { if(p_mouse_over_element_id != '' && p_mouse_over_element_id == t_mouse_over_element_id) { jQuery.ajax({data: '', url: 'request_port.php?module=mega_flyover&mf_products_id=' + Number(p_mouse_over_element_id) + '&XTCsid=' + gm_session_id, type: "POST", async: true, success: function(t_flyover_html) { if(p_mouse_over_element_id == t_mouse_over_element_id) { $('#flyover_layer').html(t_flyover_html); if(t_slideshow == true) { clearInterval(t_interval); t_interval = setInterval(coo_this.image_check, 50); } else { $('#flyover .flyover_image').eq(0).show(); } $('#flyover_layer').show(); coo_this.position_flyover(coo_event); $('.flyover_item').unbind('mouseout'); $('.flyover_item').mouseout(function(event) { if(fb)console.log('flyover_item mouseout: ' + p_mouse_over_element_id); if(typeof gm_style_edit_mode_running == 'undefined') { clearTimeout(t_timeout); clearInterval(t_interval); // IE6-workaround: hide before removing to avoid shadow deposit on screen $('#flyover_layer').hide(); $('#flyover_layer').remove(); } }); } else { if(fb)console.log('mouseout before ajax-request success'); } } }).html; } } this.image_check = function() { var t_image_loaded = true; t_image_check_loops++; for(i = 0; i < document.images.length; ++i) { if(document.images[i].complete != true) { t_image_loaded = false; } } if(t_image_loaded || t_image_check_loops > t_max_image_check_loops || navigator.userAgent.search(/Opera/) != -1) // Opera has problems to check image complete status -> ignore check { clearInterval(t_interval); t_image_check_loops = 0; coo_this.start_slideshow(0); } else { if(fb)console.log('loading images... loop: ' + t_image_check_loops); } return t_image_loaded; } this.position_flyover = function(event) { if($('#flyover_layer').length > 0) { var t_page_x = event.pageX + 5; var t_page_y = event.pageY + 5; if($(document).width() < (event.pageX - $(document).scrollLeft() + Number($('#flyover_layer').css('width').replace('px', '')) + 20)) { t_page_x = (event.pageX - $(document).scrollLeft() - (Number($('#flyover_layer').css('width').replace('px', '')) + 20)); } if((Number($('#flyover_layer').css('height').replace('px', '')) + 20) + event.pageY > $(window).height() + $(document).scrollTop()) { t_page_y = event.pageY - (Number($('#flyover_layer').css('height').replace('px', '')) + 20); } $('#flyover_layer').css( { left: t_page_x, top: t_page_y }); } } this.start_slideshow = function(p_image_number) { if($('#flyover .flyover_image').length > 1) { var t_image_number = Number(p_image_number); if(t_image_number >= $('#flyover .flyover_image').length) { t_image_number = 0; } $('#flyover .flyover_image').hide(); if(fb)console.log('show flyover_image ' + t_image_number); $('#flyover .flyover_image').eq(t_image_number).show(); t_image_number++; clearTimeout(t_timeout); t_timeout = setTimeout(function(){coo_this.start_slideshow(t_image_number);}, 1000); } else { $('#flyover .flyover_image').eq(0).show(); } } if(typeof(gm_style_edit_mode_running) == 'undefined') { this.bind_flyover(); } else { this.bind_styleedit_mode(); } } /**/ /* gm_statusbar.js.php */ /**/ t_php_helper = ''; var gm_statusbar_text = "RAM-Mount Onlineschop von CTJ 24 e.K."; var gm_statusbar_speed = Number("120"); var gm_statusbar_width = Number("100"); var gm_statusbar_length = gm_statusbar_text.length; var gm_statusbar_position = 1 - gm_statusbar_width; function gm_statusbar() { gm_statusbar_position++; var gm_statusbar_text_state=""; if (gm_statusbar_position == gm_statusbar_length){ gm_statusbar_position = 1 - gm_statusbar_width; } if (gm_statusbar_position < 0){ for (var gm_statusbar_counter = 1; gm_statusbar_counter <= Math.abs(gm_statusbar_position); gm_statusbar_counter++){ gm_statusbar_text_state = gm_statusbar_text_state + " "; }; gm_statusbar_text_state = gm_statusbar_text_state + gm_statusbar_text.substring(0, gm_statusbar_width - gm_statusbar_counter + 1); } else{ gm_statusbar_text_state = gm_statusbar_text_state + gm_statusbar_text.substring(gm_statusbar_position, gm_statusbar_width + gm_statusbar_position); } window.status = gm_statusbar_text_state; setTimeout("gm_statusbar()", gm_statusbar_speed); } t_php_helper = ''; /**/ /* CartShippingCostsTooltip.js */ $(document).ready(function() { $(".cart_shipping_costs_info_icon").live( "click", function() { var t_info_text = $( ".cart_shipping_costs_info_text" ); if( $( t_info_text ).is( ":visible" ) ) { $( t_info_text ).css( "display", "none" ); } else { $( t_info_text ).css( "display", "block" ); $( document ).trigger( 'cart_shipping_costs_info_active' ); } }); }); /*! * jQuery UI 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI */ (function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.11",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this, "position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position"); if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f, "border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h, d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}}); c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate); if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); ;/* * jQuery UI Draggable 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Draggables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */ (function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== "original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top- this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions(); d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis|| this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&& this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]|| 0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top- (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(), height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"? document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"), 10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),a.top+(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"), 10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&& d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.leftthis.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g= this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])? e:!(e-this.offset.click.left').css({width:this.offsetWidth+ "px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})},stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity", a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a= this.options;if(a.icons){c("").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", "aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.11", animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/); f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide", paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); ;/* * jQuery UI Slider 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Slider * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */ (function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled"); this.range=d([]);if(a.range){if(a.range===true){this.range=d("
");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("
");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("").appendTo(this.element).addClass("ui-slider-handle"); if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur(); else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e= false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h=== b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b, g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true}, _mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a; if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value= this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max}, _refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate); if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1, 1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.11"})})(jQuery); ;/* * jQuery UI Tabs 1.8.11 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Tabs * * Depends: * jquery.ui.core.js * jquery.ui.widget.js */ (function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| (q=d("base")[0])&&l===q.href)){i=f.hash;f.href=/i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= -1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= d.data(this,"href.tabs");if(e)this.href=/e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, "cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.11"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k' + html + ''); if(html == '') { if(typeof(coo_combi_status_check) != 'undefined' && coo_combi_status_check.last_result_json != false) { if(coo_combi_status_check.last_result_json['STATUS_CODE'] < 1) { alert(coo_combi_status_check.last_result_json['STATUS_TEXT']); return false; } } return true; } else return false; } this.check_listing = function(products_id){ var qty = 1; if($('#gm_attr_calc_qty_' + products_id).length > 0) { qty = $('#gm_attr_calc_qty_' + products_id).val(); } else if($('#gm_add_to_cart_' + products_id + ' input[name="products_qty"]').length > 0) { qty = $('#gm_add_to_cart_' + products_id + ' input[name="products_qty"]').val(); } var html = jQuery.ajax({ data: 'id=' + products_id + '&qty=' + qty, url: 'gm_ajax.php?module=order_quantity_checker', type: "GET", async: false}).responseText; html = html.replace(/^\s+|\s+$/g,""); $('#gm_checker_error_' + products_id).html(html); if(html == '') return true; else return false; } this.check_cart = function(){ var products_id = ''; var qty = ''; var inputs = []; var html = ''; var j = 0; var t_success = true; $('.gm_cart_data').each(function(){ inputs.push(escape(this.value)); } ); for(i = 0; i < inputs.length; i = i+2){ qty = inputs[i]; products_id = inputs[i+1]; products_id_copy = products_id; products_id_copy = products_id_copy.replace(/{/g, "_"); products_id_copy = products_id_copy.replace(/}/g, "_"); products_id_copy = products_id_copy.replace(/{/g, "_"); products_id_copy = products_id_copy.replace(/}/g, "_"); if($('#gm_delete_product_' + products_id_copy).attr('checked') != true) { j = products_id.indexOf('{'); if(j == -1) j = products_id.indexOf('%'); if(j != -1) products_id = products_id.slice(0, j); html = jQuery.ajax({ data: 'id=' + products_id + '&qty=' + qty, url: 'gm_ajax.php?module=order_quantity_checker', type: "GET", async: false}).responseText; html = html.replace(/^\s+|\s+$/g,""); $('#gm_checker_error_' + products_id_copy).html(html); if(html == '') { var t_sep_found = products_id.search(/x/); if(typeof(coo_combi_status_check) != 'undefined' && t_sep_found != -1) { // extended pid found. check combis_id! coo_combi_status_check.get_combi_status_by_ext_products_id(products_id, qty); if(coo_combi_status_check.last_result_json != false) { if(coo_combi_status_check.last_result_json['STATUS_CODE'] < 1) { $('#gm_checker_error_' + products_id_copy).html(coo_combi_status_check.last_result_json['STATUS_TEXT']); t_success = false; } } } } else { t_success = false; } } } return t_success; } this.check_wishlist = function(){ var products_id = ''; var qty = ''; var inputs = []; var html = ''; var j = 0; var t_success = true; $('.gm_cart_data').each(function(){ inputs.push(escape(this.value)); } ); for(i = 0; i < inputs.length; i = i+2){ qty = inputs[i]; products_id = inputs[i+1]; products_id_copy = products_id; products_id_copy = products_id_copy.replace(/{/g, "_"); products_id_copy = products_id_copy.replace(/}/g, "_"); products_id_copy = products_id_copy.replace(/{/g, "_"); products_id_copy = products_id_copy.replace(/}/g, "_"); j = products_id.indexOf('{'); if(j == -1) j = products_id.indexOf('%'); if(j != -1) products_id = products_id.slice(0, j); html = jQuery.ajax({ data: 'id=' + products_id + '&qty=' + qty, url: 'gm_ajax.php?module=order_quantity_checker', type: "GET", async: false}).responseText; html = html.replace(/^\s+|\s+$/g,""); $('#gm_checker_error_' + products_id_copy).html(html); if(html != '') t_success = false; } return t_success; } } /**/ /* GMAttributesCalculator.js */ /**/ $(document).ready(function(){ $('.gm_products_id').each(function(){ var attr_calc = new GMAttributesCalculator(); attr_calc.calculate_listing($(this).attr('value')); }); if(typeof($(".gm_attr_calc_input").attr('class')) != 'undefined' || typeof($(".graduated_prices_detail_row").attr('class')) != 'undefined') { var attr_calc = new GMAttributesCalculator(); attr_calc.calculate(); var t_changed = false; if($(".gm_attr_calc_input").attr('type') == 'radio') { $(".gm_attr_calc_input").click(function() { if(t_changed == false) { var attr_calc = new GMAttributesCalculator(); attr_calc.calculate(); } }); } else { $(".gm_attr_calc_input").change(function() { // change-event is needed for Safari 4 var attr_calc = new GMAttributesCalculator(); attr_calc.calculate(); t_changed = true; }); } } // attributes price and graduated price $("#gm_attr_calc_qty").keyup(function(){ var attr_calc = new GMAttributesCalculator(); attr_calc.calculate(); coo_dropdowns_listener.check_combi_status(); }); } ); function GMAttributesCalculator(){ this.calculate = function(){ if($(".details_attributes_dropdown").length == 0){ jQuery.ajax({data: $("#cart_quantity").serialize(), url: 'gm_ajax.php?module=calculate_weight&XTCsid='+gm_session_id, type: "POST", async: true, success: function(t_updated_weight){ $("#gm_calc_weight").html(t_updated_weight); } }).html; } jQuery.ajax({data: $("#cart_quantity").serialize(), url: 'gm_ajax.php?module=calculate_price&XTCsid='+gm_session_id, type: "POST", async: true, success: function(t_updated_price){ $("#gm_attr_calc_price").html(t_updated_price); } }).html; } this.calculate_listing = function(gm_id, p_force_request){ var inputs = []; var t_has_price = false; $('#gm_add_to_cart_' + gm_id + ' .gm_listing_form').each(function() { if($(this).attr('type') == 'radio') { if($(this).attr('checked') == true){ inputs.push(this.name + '=' + escape(this.value)); if($(this).hasClass('has-price')) { t_has_price = true; } } } else { inputs.push(this.name + '=' + escape(this.value)); if(typeof($(this).find('option:selected')) != 'undefined' && $(this).find('option:selected').hasClass('has-price') == true) { t_has_price = true; } } } ); if((t_has_price == true || (typeof(p_force_request) != 'undefined' && p_force_request == true)) && (inputs.join('&').search(/id\[/) != -1 || typeof($('#gm_add_to_cart_' + gm_id + ' .gm_graduated_prices').attr('class')) != 'undefined')) { var updated_price = jQuery.ajax({data: inputs.join('&') + '&products_id=' + gm_id, url: 'gm_ajax.php?module=calculate_price&XTCsid='+gm_session_id, type: "POST", async: true, success: function(updated_price){ $('#gm_attr_calc_price_' + gm_id).html(updated_price); } }).html; if($('#gm_calc_weight_' + gm_id).length > 0) { jQuery.ajax({data: inputs.join('&') + '&products_id=' + gm_id, url: 'gm_ajax.php?module=calculate_weight&XTCsid='+gm_session_id, type: "POST", async: true, success: function(p_weight) { $('#gm_calc_weight_' + gm_id).html(p_weight); } }); } } } } /**/ /* GMAttributeImages.js */ /**/ $(document).ready(function(){ var attr_img = new GMAttributeImages(); attr_img.get_attribute_images(); $(".gm_attr_calc_input").bind("change", function(){ if(!$(this).hasClass("properties_values_select_field")){ var attr_img = new GMAttributeImages(); attr_img.get_attribute_images(); } }); }); function GMAttributeImages() { this.get_attribute_images = function() { var gm_options_ids = ''; var gm_values_ids = ''; $('.gm_attr_calc_input').each(function() { if($(this).attr('checked') == true) { gm_options_ids += $(this).attr('name') + ','; gm_values_ids += $(this).attr('value') + ','; } }); if(gm_options_ids == '') { $('.gm_attr_calc_input').each(function() { gm_options_ids += $(this).attr('name') + ','; gm_values_ids += $(this).attr('value') + ','; }); } $('#gm_attribute_images').load('gm_ajax.php?module=attribute_images&options_ids=' + gm_options_ids + '&values_ids=' + gm_values_ids, function(attribute_images) { $('#gm_attribute_images').html(attribute_images); } ); } } /**/ /* gm_product_details.js */ /**/ var addthis_config = {ui_delay: 200,services_exclude: 'print'}; $(document).ready(function() { $("#product_info #print, #product_info #print_icon, .details .button_print").click(function() { window.open('https://ctj24.de/print_product_info.php?products_id=' + $("#gm_products_id").attr('value') + '&XTCsid=' + gm_session_id, 'popup', 'toolbar=0, width=640, height=600'); return false; }); if($('#tabbed_description_part').length > 0) { if(fb)console.log('tabbed_description_part ready'); $("#tabbed_description_part").tabs(); } else { // TODO if($('#description-1').length > 0) { var t_description = $('#description-1').html(); if(t_description.toLowerCase().replace(/\s/g, '') != '


    ' && t_description.toLowerCase().replace(/\s/g, '') != '

    ') { $('#description-1').html(''); $('#description-1').append('
    ' + t_description + '
    '); } //$("#tabbed_description_part").tabs(); //$("#tabbed_description_part").tabs('add', 'TEST'); } } $("#tabbed_description_part ul.ui-tabs-nav li a").live('click', function() { return false; }); $('#gm_show_tell_a_friend .icon_lightbox_close').die('click'); $('#gm_show_tell_a_friend .icon_lightbox_close').live('click', function() { if(fb)console.log('.icon_lightbox_close click'); if(typeof(gmLightBox) != 'undefined') { gmLightBox.close_box(); } return false; }); }); /**/ /* */ /**/ (function($){ $.fn.attributes_dropdown_mode = function(p_dropdown_mode){ var self = this; var v_combis_exists_array = new Array(); var v_combis_available_array = new Array(); var v_active_stock_check = false; if((use_properties_combis_quantity == 0 && properties_stock_check == true) || use_properties_combis_quantity == 2){ v_active_stock_check = true; } $.each(properties_combis_json, function(t_properties_combis_key, t_properties_combis_value){ var $t_combis_values_array = new Array(); for(var i = 0; i <= t_properties_combis_value.COMBIS_VALUES.length-1; i++){ $t_combis_values_array.push(t_properties_combis_value.COMBIS_VALUES[i].properties_values_id); } v_combis_exists_array.push(','+$t_combis_values_array.toString()+','); }); $.each(properties_combis_json, function(t_properties_combis_key, t_properties_combis_value){ if(v_active_stock_check && t_properties_combis_value.combi_quantity > 0){ var $t_combis_values_array = new Array(); for(var i = 0; i <= t_properties_combis_value.COMBIS_VALUES.length-1; i++){ $t_combis_values_array.push(t_properties_combis_value.COMBIS_VALUES[i].properties_values_id); } v_combis_available_array.push(','+$t_combis_values_array.toString()+','); } }); if($.browser.msie){ if($.browser.version == "7.0"){ var v_option_values_origin = new Array(); $.each($(self).find("select"), function(t_select_key, t_select_value){ v_option_values_origin[t_select_key] = new Array(); $.each($(t_select_value).find("option"), function(t_option_key, t_option_value){ v_option_values_origin[t_select_key][$(t_option_value).val()] = $(t_option_value).text(); }); }); } } $(self).find("select").bind("change", function(){ changeValues(this); }); changeValues($("span.select_fake", self)); function changeValues(t_actual_select){ if(p_dropdown_mode == "mode_1"){ $("option", self).attr("disabled", "disabled"); $("option[value=0]", self).removeAttr("disabled"); }else{ $(t_actual_select).parent().nextAll('dt').css('visibility', 'hidden'); $(t_actual_select).parent().nextAll('dd').css('visibility', 'hidden'); $(".details_attributes_dropdown").find("dt:eq(0)").css("visibility", "visible"); $(".details_attributes_dropdown").find("dd:eq(0)").css("visibility", "visible"); $(t_actual_select).parent().nextAll('dd').find("select").val(0); $(t_actual_select).parent().nextAll('dd').find("option").attr("disabled", "disabled"); $("option[value=0]", self).removeAttr("disabled"); } var t_select_values_array = new Array(); $.each($(self).find("select"), function(key1, value1){ t_select_values_array.push($(value1).val()); }); var t_select_values_string = ','+t_select_values_array.toString()+','; if($.browser.msie){ if($.browser.version == "7.0"){ if(p_dropdown_mode == "mode_1"){ $(self).find("select").empty(); }else{ $(t_actual_select).parent().nextAll("dd").find("select").empty(); } var selects = $(self).find("select"); $.each(selects, function(select_key, select_value){ if($(select_value).find("option").length == 0){ $.each(v_option_values_origin[select_key], function(t_option_origin_key, t_option_origin_value){ if(t_option_origin_value != undefined){ $(select_value).append($("")); } }); $(select_value).val(t_select_values_array[select_key]); } }); } } // PREPARE FOR REGEX #1 var t_reg1_select_values_string = t_select_values_string.replace(/,0/g, ',[0-9]+'); var t_match_array = new Array(); if(v_active_stock_check){ $.each(v_combis_available_array, function(combis_key, combis_value){ var t_matches = combis_value.match((t_reg1_select_values_string)); if(t_matches != null){ t_match_array.push(t_matches[0]); } }); }else{ $.each(v_combis_exists_array, function(combis_key, combis_value){ var t_matches = combis_value.match((t_reg1_select_values_string)); if(t_matches != null){ t_match_array.push(t_matches[0]); } }); } // PREPARE FOR REGEX #2 $.each(t_select_values_array, function(select_value_key, select_value_value){ var t_tmp_select_values_array = t_select_values_array.slice(0); $.each(t_select_values_array, function(select_value_key2, select_value_value2){ if(select_value_value == select_value_value2 && select_value_value2 != 0){ t_tmp_select_values_array[select_value_key2] = '([0-9]+)'; }else if(select_value_value2 == 0){ t_tmp_select_values_array[select_value_key2] = '[0-9]+'; } }); if(t_tmp_select_values_array[select_value_key] != '[0-9]+'){ var t_reg2_select_values_string = t_tmp_select_values_array.toString(); if(v_active_stock_check){ $.each(v_combis_available_array, function(combis_key, combis_value){ var t_matches = combis_value.match((t_reg2_select_values_string)); if(t_matches != null){ t_match_array.push(t_matches[1]); } }); }else{ $.each(v_combis_exists_array, function(combis_key, combis_value){ var t_matches = combis_value.match((t_reg2_select_values_string)); if(t_matches != null){ t_match_array.push(t_matches[1]); } }); } } }); if($.browser.msie){ if($.browser.version == "7.0"){ var t_valid_options_array = new Array(); } } $.each(t_match_array, function(match_key, match_value){ var t_properties_id_array = match_value.split(','); $.each(t_properties_id_array, function(properties_id_key, properties_id_value){ if($.browser.msie){ if($.browser.version == "7.0"){ t_valid_options_array.push(parseInt(properties_id_value)); } } $("option[value="+properties_id_value+"]", self).removeAttr("disabled"); }); }); if($.browser.msie){ if($.browser.version == "7.0"){ var t_options; if(p_dropdown_mode == "mode_1"){ t_options = $(self).find("option"); }else{ t_options = $(t_actual_select).parent().nextAll("dd").find("option"); } $.each(t_options, function(option_key, option_value){ if($.inArray(parseInt($(option_value).val()), t_valid_options_array) == -1 && parseInt($(option_value).val()) != 0){ $("option[value="+$(option_value).val()+"]", self).remove(); } }); } } if(p_dropdown_mode != "mode_1"){ if($(t_actual_select).val() != 0){ $(t_actual_select).parent().next().css('visibility', 'visible'); $(t_actual_select).parent().next().next().css('visibility', 'visible'); $(t_actual_select).parent().next().next().find('select').val(0); } } } }; })(jQuery); (function($){ $.fn.attributes_check = function(){ var self = this; var t_default_combi_quantity_value = $("dd.products_quantity span.products_quantity_value").html(); var t_default_shipping_time_image = $("dd.shipping_time img").attr("src"); var t_default_shipping_time_value = $("dd.shipping_time span.products_shipping_time_value").html(); var t_default_combi_weight = $("#gm_calc_weight").html(); var t_default_products_model = $("dd.products_model").html(); $(self).find("select").bind("change", function(){ if($(self).find("select[value=0]").length == 0){ var t_select_values_array = new Array(); var t_combi_image = ""; var t_combi_quantity = ""; var t_shipping_time_image = ""; var t_shipping_time_value = ""; var t_combi_weight = ""; var t_products_model = ""; var t_combi_exists = false; $.each($(self).find("select"), function(key1, value1){ t_select_values_array.push($(value1).val()); }); $("#properties_not_available_error").hide(); $("#properties_not_exist_error").hide(); $.each(properties_combis_json, function(t_properties_combis_key, t_properties_combis_value){ var $t_actual_combi_status = true; for(var i = 0; i <= t_properties_combis_value.COMBIS_VALUES.length-1; i++){ if($.inArray(t_properties_combis_value.COMBIS_VALUES[i].properties_values_id, t_select_values_array) == -1){ $t_actual_combi_status = false; } } if($t_actual_combi_status){ t_combi_exists = true; t_combi_image = t_properties_combis_value.combi_image; if((use_properties_combis_quantity == 0 && properties_stock_check == true)|| use_properties_combis_quantity == 2){ t_combi_quantity = t_properties_combis_value.combi_quantity; if(t_combi_quantity == 0){ $("#properties_not_available_error").show(); } } if(use_properties_combis_shipping_time == 1){ t_shipping_time_image = t_properties_combis_value.combi_shipping_status_image; t_shipping_time_value = t_properties_combis_value.combi_shipping_status_name; } t_combi_weight = t_properties_combis_value.combi_weight; if(t_properties_combis_value.append_products_model == "true"){ if(t_properties_combis_value.combi_model == '' && t_default_products_model == '-'){ t_products_model = t_default_products_model; }else if(t_properties_combis_value.combi_model == ''){ t_products_model = t_default_products_model; }else if(t_default_products_model == '-'){ t_products_model = t_properties_combis_value.combi_model; }else{ t_products_model = t_default_products_model + '-' + t_properties_combis_value.combi_model; } }else{ if(t_properties_combis_value.combi_model != ""){ t_products_model = t_properties_combis_value.combi_model; }else{ t_products_model = t_default_products_model; } } } }); if(!t_combi_exists){ $("#properties_not_exist_error").show(); } if(t_combi_image != ""){ var t_image = $("").attr("src", "images/product_images/properties_combis_images/"+t_combi_image); $("#gm_attribute_images").html(t_image); }else{ $("#gm_attribute_images").empty(); } if(t_combi_quantity != ""){ $("dd.products_quantity span.products_quantity_value").html(t_combi_quantity); }else{ $("dd.products_quantity span.products_quantity_value").html(t_default_combi_quantity_value); } if(t_shipping_time_image != ""){ var t_image_path = $("dd.shipping_time img").attr("src"); var t_image_path_split = t_image_path.split("/"); var t_new_image_path = t_image_path.replace(t_image_path_split[t_image_path_split.length-1], t_shipping_time_image); $("dd.shipping_time img").attr("src", t_new_image_path); $("dd.shipping_time img").attr("alt", t_shipping_time_value); }else{ $("dd.shipping_time img").attr("src", t_default_shipping_time_image); $("dd.shipping_time img").attr("alt", t_default_shipping_time_value); } if(t_shipping_time_value != ""){ $("dd.shipping_time span.products_shipping_time_value").html(t_shipping_time_value); }else{ $("dd.shipping_time span.products_shipping_time_value").html(t_default_shipping_time_value); } if(t_combi_weight != ""){ $("#gm_calc_weight").html(t_combi_weight); }else{ $("#gm_calc_weight").html(t_default_combi_weight); } if(t_products_model != ""){ $("dd.products_model").html(t_products_model); }else{ $("dd.products_model").html(t_default_products_model); } }else{ $("#properties_not_available_error").hide(); $("#properties_not_exist_error").hide(); $("#gm_attribute_images").empty(); $("dd.products_quantity span.products_quantity_value").html(t_default_combi_quantity_value); $("dd.shipping_time img").attr("src", t_default_shipping_time_image); $("dd.shipping_time span.products_shipping_time_value").html(t_default_shipping_time_value); $("#gm_calc_weight").html(t_default_combi_weight); $("dd.products_model").html(t_default_products_model); } }); }; })(jQuery); $(document).ready(function() { if($(".details_attributes_dropdown.dropdown_mode_1").length == 1){ $(".details_attributes_dropdown.dropdown_mode_1").attributes_dropdown_mode("mode_1"); } if($(".details_attributes_dropdown.dropdown_mode_2").length == 1){ $(".details_attributes_dropdown.dropdown_mode_2").attributes_dropdown_mode("mode_2"); } $(".details_attributes_dropdown").attributes_check(); }); /**//* ButtonProductImagesHandler.js */ /**/ function ButtonProductImagesHandler(p_lightbox, p_zoom, p_delay) { if(fb)console.log('ButtonProductImagesHandler ready'); var t_lightbox = true; if(typeof(p_lightbox) == 'boolean') { t_lightbox = p_lightbox; } var t_zoom = true; if(typeof(p_zoom) == 'boolean') { t_zoom = p_zoom; } var t_delay = 500; if(parseInt(p_delay) != 'NaN') { t_delay = parseInt(p_delay); } var coo_this = this; var t_interval = 0; var t_images_array = new Object(); var t_close_lightbox = true; var t_wait = false; var t_timeout = 0; var t_active_image_id = ''; var t_last_image_html = ''; this.init_binds = function() { if(fb)console.log('ButtonProductImagesHandler init_binds'); this.bind_thumbnails(); if(t_zoom) { this.bind_zoom(); } if(t_lightbox) { this.bind_lightbox(); } else { $('.button_lightbox_gallery').die('click'); $('.button_lightbox_gallery').live('click', function() { if(fb)console.log('.button_lightbox_gallery click'); if($('.gallery .inside .stage #crossslide').length > 0 && $('.gallery .inside .stage #crossslide').css('display') != 'none') { coo_this.show_image(this); } return false; }); } } this.bind_thumbnails = function() { if(fb)console.log('bind_thumbnails'); var t_thumbnail_id = ''; $('a.button_product_images').die('mouseover'); $('a.button_product_images').live('mouseover', function() { if(fb)console.log('a.button_product_images mouseover: ' + $(this).attr('id')); $(this).attr('title', ''); $(this).find('img').attr('title', ''); $(this).find('img').attr('alt', ''); if($('.gallery .inside .stage #crossslide').length == 0 || $('.gallery .inside .stage #crossslide').css('display') == 'none') { t_active_image_id = '#' + $(this).attr('id'); if(t_wait == false) { coo_this.show_image(this); } } return false; }); $('.button_product_images').die('mouseout'); $('.button_product_images').live('mouseout', function() { clearInterval(t_interval); if($('.gallery .inside .stage .info_image_box').html() == 'loading...') { $('.gallery .inside .stage .info_image_box').html(t_last_image_html); coo_this.init_binds(); } clearTimeout(t_timeout); t_active_image_id = ''; t_wait = true; t_timeout = setTimeout(coo_this.show_image_after_delay, t_delay); t_thumbnail_id = $(this).attr('id'); t_thumbnail_id = t_thumbnail_id.replace('gallery_inside_thumbnail_', ''); $('.gallery .inside .stage #gallery_inside_main_' + t_thumbnail_id).closest('a').removeClass('jqzoom'); return false; }); } this.show_image_after_delay = function() { t_wait = false; if(t_active_image_id != '') { if(fb)console.log('show_image_after_delay(): ' + t_active_image_id); coo_this.show_image(t_active_image_id); } else { if(fb)console.log('show_image_after_delay(): no element'); } } this.show_image = function(p_element) { if(typeof($(p_element).attr('id')) != 'undefined' && $(p_element).attr('id').search('gallery_inside_thumbnail_') != -1) { $('.gallery .inside .stage #crossslide').hide(); $('a.button_product_images').removeClass('active_thumbnail'); $(p_element).addClass('active_thumbnail'); t_thumbnail_id = $(p_element).attr('id'); t_thumbnail_id = t_thumbnail_id.replace('gallery_inside_thumbnail_', ''); t_images_array[t_thumbnail_id] = new Image(); t_images_array[t_thumbnail_id].src = $(p_element).attr('href'); t_load_image = this.load_image(t_thumbnail_id, $(p_element).attr('rel')); if(t_load_image == false) { t_interval = setInterval(function(){coo_this.load_image(t_thumbnail_id, $(p_element).attr('rel'));}, 100); } } } this.load_image = function(p_id, p_zoom_url) { var c_id = Number(p_id); var t_image_loaded = true; if(t_images_array[c_id].complete != true) { t_image_loaded = false; } if(t_image_loaded) { clearInterval(t_interval); var t_style = ''; if(t_lightbox == false) { t_style = ' style="cursor: default;"'; } // create relative image path, to avoid problems with umlaut domains var t_image_url = t_images_array[c_id].src; t_image_url = t_image_url.substring(t_image_url.search('images/product_images'), t_image_url.length); $('.gallery .inside .stage .info_image_box').css('width', t_images_array[c_id].width + 'px'); $('.gallery .inside .stage .info_image_box').html(''); if(t_zoom) { this.bind_zoom(); } } else { if($('.gallery .inside .stage .info_image_box').html() != 'loading...') { t_last_image_html = $('.gallery .inside .stage .info_image_box').html(); } $('.gallery .inside .stage .info_image_box').html('loading...'); if(fb)console.log('loading images...'); } return t_image_loaded; } this.bind_zoom = function() { if($('.gallery .inside .stage #crossslide').length == 0 || $('.gallery .inside .stage #crossslide').css('display') == 'none') { // workaround for chrome browser $('.gallery .inside .stage .info_image_box').html($('.gallery .inside .stage .info_image_box').html()); if($(".info_image_box").length > 0) { $(".info_image_box").zoom_plugin(); } } } this.bind_lightbox = function() { if(fb)console.log('bind_lightbox'); $('.button_lightbox_gallery').die('click'); $('.button_lightbox_gallery').live('click', function() { if(fb)console.log('.button_lightbox_gallery click'); if($('.gallery .inside .stage #crossslide').length > 0 && $('.gallery .inside .stage #crossslide').css('display') != 'none') { coo_this.show_image(this); } else { $('.wrap_shop').append(''); $('#lightbox_gallery_box').css( { position: 'absolute', left: '0px', top: '60px', width: '100%' }); $('#lightbox_gallery_box').load('request_port.php?module=lightbox_gallery&id=' + $("#gm_products_id").attr('value') + '&XTCsid=' + gm_session_id, function(lightbox_gallery) { coo_this.gallery_init_binds(); coo_this.preload(); } ); if (navigator.appVersion.match(/MSIE [0-6]\./)) { $('.lightbox_visibility_hidden').css( { visibility: 'hidden' }); } gmLightBox.load_box('#lightbox_gallery_box'); // BOF MOD by PT $('#menubox_gm_scroller').css({ display: 'none' }); if($(document).height() > $('#popup_box').height()) { var pt_height = $(document).height(); } else { var pt_height = $('#popup_box').height() + 200; } $('#__dimScreen').css({height: pt_height + 'px'}); // EOF MOD by PT } return false; }); } this.gallery_init_binds = function() { if(fb)console.log('gallery init_binds'); var t_main_height = Number($('#lightbox_gallery_main').css('height').replace('px', '')); var t_button_height = 0; if($('#lightbox_gallery_main .icon_gallery_back:first').length > 0) { t_button_height = Number($('#lightbox_gallery_main .icon_gallery_back:first').css('height').replace('px', '')); } var t_margin_top = Math.round(t_main_height / 2) - Math.round(t_button_height / 2); $('#lightbox_gallery_main .icon_gallery_back').wrap('
    '); $('#lightbox_gallery_main .icon_gallery_next').wrap('
    '); $('#lightbox_gallery').die('mouseenter'); $('#lightbox_gallery').live('mouseenter', function() { if(fb)console.log('#lightbox_gallery mouseenter'); t_close_lightbox = false; }); $('#lightbox_gallery').die('mouseleave'); $('#lightbox_gallery').live('mouseleave', function() { if(fb)console.log('#lightbox_gallery mouseleave'); t_close_lightbox = true; }); $('body').click(function() { if(t_close_lightbox && typeof(gm_style_edit_mode_running) == 'undefined') { gmLightBox.close_box(); } }); // centering thumbnails var t_thumbnails_width = 0; var t_thumbnail_width = Number($('#lightbox_gallery .thumbnail').css('width').replace('px', '')) + Number($('#lightbox_gallery .thumbnail').css('margin-right').replace('px', '')) + Number($('#lightbox_gallery .thumbnail').css('padding-left').replace('px', '')) + Number($('#lightbox_gallery .thumbnail').css('padding-right').replace('px', '')) + Number($('#lightbox_gallery .thumbnail').css('border-left-width').replace('px', '')) + Number($('#lightbox_gallery .thumbnail').css('border-right-width').replace('px', '')); var t_gallery_width = Number($('#lightbox_gallery').css('width').replace('px', '')); t_thumbnails_width = $('#lightbox_gallery .thumbnail').length * t_thumbnail_width; if(t_gallery_width < t_thumbnails_width) { var t_thumbnails_per_row = Math.floor(t_gallery_width / t_thumbnail_width); t_thumbnails_width = t_thumbnails_per_row * t_thumbnail_width; } $('#lightbox_gallery_thumbnails').css('width', t_thumbnails_width + 'px'); var t_active_image = 0; var count_thumbnails = 0; $('.gallery .thumbnails .button_product_images').each(function() { if($(this).attr('class').search('active_thumbnail') != -1) { t_active_image = count_thumbnails; } count_thumbnails++; }); $('#lightbox_gallery_main').css('background-image', 'url(' + $('#lightbox_gallery .thumbnail a').eq(t_active_image).attr('href') + ')'); $('#lightbox_gallery .thumbnail').eq(t_active_image).addClass('lightbox_thumbnail_active'); $('#lightbox_gallery .thumbnail a').die('click'); $('#lightbox_gallery .thumbnail a').live('click', function() { if(fb)console.log('#lightbox_gallery .thumbnail a click'); $('#lightbox_gallery .thumbnail').removeClass('lightbox_thumbnail_active'); $(this).parent().addClass('lightbox_thumbnail_active'); var t_popup_image_url = $(this).attr('href'); $('#lightbox_gallery_main').css('background-image', 'url(' + t_popup_image_url + ')'); coo_this.update_navigation(true); return false; }); $('#lightbox_gallery .lightbox_gallery_left, #lightbox_gallery .lightbox_gallery_left a').unbind('click'); $('#lightbox_gallery .lightbox_gallery_left, #lightbox_gallery .lightbox_gallery_left a').click(function() { if(fb)console.log('#lightbox_gallery .lightbox_gallery_left, #lightbox_gallery .lightbox_gallery_left a click'); var t_current_image = $('#lightbox_gallery_main').css('background-image').replace('url("', '').replace('")', ''); var t_previous_image = ''; var t_previous_element = null; var t_updated_image = false; $('#lightbox_gallery .thumbnail a').each(function() { if(t_current_image.search($(this).attr('href')) != -1) { if(t_previous_image != '') { $('#lightbox_gallery_main').css('background-image', 'url(' + t_previous_image + ')'); $('#lightbox_gallery .thumbnail').removeClass('lightbox_thumbnail_active'); $(t_previous_element).parent().addClass('lightbox_thumbnail_active'); t_updated_image = true; } } else { t_previous_image = $(this).attr('href'); t_previous_element = this; } }); if(t_updated_image == false) { $('#lightbox_gallery_main').css('background-image', 'url(' + $('#lightbox_gallery .thumbnail a').eq($('#lightbox_gallery .thumbnail a').length - 1).attr('href') + ')'); $('#lightbox_gallery .thumbnail').removeClass('lightbox_thumbnail_active'); $('#lightbox_gallery .thumbnail a').eq($('#lightbox_gallery .thumbnail a').length - 1).parent().addClass('lightbox_thumbnail_active'); } coo_this.update_navigation(true); return false; }); $('#lightbox_gallery .lightbox_gallery_right, #lightbox_gallery .lightbox_gallery_right a').unbind('click'); $('#lightbox_gallery .lightbox_gallery_right, #lightbox_gallery .lightbox_gallery_right a').click(function() { if(fb)console.log('#lightbox_gallery .lightbox_gallery_right, #lightbox_gallery .lightbox_gallery_right a click'); var t_current_image = $('#lightbox_gallery_main').css('background-image').replace('url("', '').replace('")', ''); var t_current_image_reached = false; var t_updated_image = false; $('#lightbox_gallery .thumbnail a').each(function() { if(t_current_image_reached == true) { $('#lightbox_gallery_main').css('background-image', 'url(' + $(this).attr('href') + ')'); $('#lightbox_gallery .thumbnail').removeClass('lightbox_thumbnail_active'); $(this).parent().addClass('lightbox_thumbnail_active'); t_current_image_reached = false; t_updated_image = true; } if(t_current_image.search($(this).attr('href')) != -1) { t_current_image_reached = true; } }); if(t_updated_image == false) { $('#lightbox_gallery_main').css('background-image', 'url(' + $('#lightbox_gallery .thumbnail a').eq(0).attr('href') + ')'); $('#lightbox_gallery .thumbnail').removeClass('lightbox_thumbnail_active'); $('#lightbox_gallery .thumbnail a').eq(0).parent().addClass('lightbox_thumbnail_active'); } coo_this.update_navigation(true); return false; }); var t_right_mouseover = false; // BOF previous image $('#lightbox_gallery .lightbox_gallery_left').die('mouseover'); $('#lightbox_gallery .lightbox_gallery_left').live('mouseover', function() { if(fb)console.log('#lightbox_gallery .lightbox_gallery_left mouseover'); if(!t_right_mouseover) { $('.icon_gallery_back').addClass('icon_gallery_back_active'); $('.icon_gallery_next').removeClass('icon_gallery_next_active'); } }); $('#lightbox_gallery .lightbox_gallery_left').die('mouseout'); $('#lightbox_gallery .lightbox_gallery_left').live('mouseout', function() { if(fb)console.log('#lightbox_gallery .lightbox_gallery_left mouseout'); $('.icon_gallery_back').removeClass('icon_gallery_back_active'); }); // EOF previous image // BOF next image $('#lightbox_gallery .lightbox_gallery_right').die('mouseover'); $('#lightbox_gallery .lightbox_gallery_right').live('mouseover', function() { if(fb)console.log('#lightbox_gallery .lightbox_gallery_right mouseover'); t_right_mouseover = true; $('.icon_gallery_next').addClass('icon_gallery_next_active'); $('.icon_gallery_back').removeClass('icon_gallery_back_active'); }); $('#lightbox_gallery .lightbox_gallery_right').die('mouseout'); $('#lightbox_gallery .lightbox_gallery_right').live('mouseout', function() { if(fb)console.log('#lightbox_gallery .lightbox_gallery_right mouseout'); t_right_mouseover = false; $('.icon_gallery_next').removeClass('icon_gallery_next_active'); }); // EOF next image // BOF close $('#lightbox_gallery .icon_lightbox_close').die('click'); $('#lightbox_gallery .icon_lightbox_close').live('click', function() { if(fb)console.log('#lightbox_gallery .icon_lightbox_close click'); gmLightBox.close_box(); return false; }); // EOF close coo_this.update_navigation(true); } this.update_navigation = function(p_loop) { if(p_loop == false) { if($('#lightbox_gallery_main').css('background-image').replace('url("', '').replace('")', '').search($('#lightbox_gallery .thumbnail a').eq(0).attr('href')) != -1) { $('#lightbox_gallery .lightbox_gallery_left').css('visibility', 'hidden'); } else { $('#lightbox_gallery .lightbox_gallery_left').css('visibility', 'visible'); } if($('#lightbox_gallery_main').css('background-image').replace('url("', '').replace('")', '').search($('#lightbox_gallery .thumbnail a').eq($('#lightbox_gallery .thumbnail a').length-1).attr('href')) != -1) { $('#lightbox_gallery .lightbox_gallery_right').css('visibility', 'hidden'); } else { $('#lightbox_gallery .lightbox_gallery_right').css('visibility', 'visible'); } } else { if($('#lightbox_gallery_thumbnails .thumbnail').length > 1) { $('#lightbox_gallery .lightbox_gallery_left, #lightbox_gallery .lightbox_gallery_right').css('visibility', 'visible'); } else { $('#lightbox_gallery_thumbnails').hide(); } } } this.preload = function() { var t_images = new Array(); var count_thumbnails = 0; $('#lightbox_gallery .thumbnail a').each(function() { t_images[count_thumbnails] = new Image(); t_images[count_thumbnails].src = $(this).attr('href'); count_thumbnails++; }); } this.init_binds(); } /**/ /* ButtonDetailsAddCartHandler.js */ /**/ function ButtonDetailsAddCartHandler() { if(fb)console.log('ButtonDetailsAddCartHandler ready'); this.init_binds = function() { if(fb)console.log('ButtonDetailsAddCartHandler init_binds'); $('.button_details_add_cart').die('click'); $('.button_details_add_cart').live('click', function(event) { if(fb)console.log('.button_details_add_cart click'); gm_qty_check = new GMOrderQuantityChecker(); if(gm_qty_check.check()) { var t_operation_form = $(this).closest('form'); coo_cart_control.submit_buy_now_form(t_operation_form); } return false; }); $('.button_details_add_cart').closest('form').submit(function() { gm_qty_check = new GMOrderQuantityChecker(); if(gm_qty_check.check()) { coo_cart_control.submit_buy_now_form(this); } return false; }); } this.init_binds(); } /**//* CombiStatusCheck.js */ /**/ function CombiStatusCheck() { $(document).ready( function() { if(fb)console.log('CombiStatusCheck ready'); } ); this.last_result_json = false; this.get_combi_status_by_ext_products_id = function(p_extended_products_id, p_need_qty) { if(fb)console.log('CombiStatusCheck get_combi_status_by_ext_products_id '+ p_extended_products_id); var coo_this = this; var t_sep_found = p_extended_products_id.search(/x/); if(t_sep_found == -1) { if(fb)console.log('t_sep_found -1'); // no seperator found. unextended products_id return false; } if(fb)console.log('t_sep_found TRUE'); var t_id_array = p_extended_products_id.split('x'); var t_combis_id = t_id_array[1]; var t_transfer_data = []; t_transfer_data.push('module=properties_combis_status_by_combis_id'); t_transfer_data.push('combis_id=' + escape(t_combis_id)); t_transfer_data.push('need_qty=' + escape(p_need_qty)); $.ajax({ url: 'request_port.php', data: t_transfer_data.join('&'), dataType: 'json', async: false, success: function(p_data) { if(fb)console.log('CombiStatusCheck get_combi_status_by_ext_products_id: ' + p_data['STATUS_CODE'] +' '+ p_data['STATUS_TEXT']); coo_this.last_result_json = p_data; } }); } this.get_combi_status = function(p_products_id, p_properties_values_id_array, p_need_qty) { if(fb)console.log('CombiStatusCheck get_combi_status'); var coo_this = this; var send_ajax_request = true; var t_transfer_data = []; t_transfer_data.push('module=properties_combis_status'); t_transfer_data.push('products_id=' + escape(p_products_id)); t_transfer_data.push('need_qty=' + escape(p_need_qty)); if(typeof p_properties_values_id_array != 'object') { if(fb)console.log('ERROR CombiStatusCheck get_combi_status: p_properties_values_id_array not an Array!'); send_ajax_request = false; } else { for(var i=0; i 0) { var t_need_qty = $('#gm_attr_calc_qty').val(); // get combi status and write to page coo_combi_status_check.get_combi_status(t_products_id, t_value_ids_array, t_need_qty); // $('#properties_info_text').html(t_status_json['STATUS_TEXT']); } } } /**/ /* ButtonDetailsAddWishlistHandler.js */ /**/ function ButtonDetailsAddWishlistHandler() { if(fb)console.log('ButtonDetailsAddWishlistHandler ready'); this.init_binds = function() { if(fb)console.log('ButtonDetailsAddWishlistHandler init_binds'); if($('#gm_gprint').length == 0) { $('.button_details_add_wishlist').die('click'); $('.button_details_add_wishlist').live('click', function(event) { if(fb)console.log('.button_details_add_wishlist click'); document.cart_quantity.submit_target.value = "wishlist"; document.cart_quantity.submit(); return false; }); } } this.init_binds(); } /**/