5
|
1 |
(function($) { |
|
2 |
$(document).ready( function() { |
|
3 |
/* new version */ |
|
4 |
var product = $( '.bws_product' ), |
|
5 |
max = 0; |
|
6 |
$( product ).each( function () { |
|
7 |
if ( $( this ).outerHeight( true ) > max ) |
|
8 |
max = $( this ).outerHeight( true ); |
|
9 |
}); |
|
10 |
$( '.bws_product' ).css( 'height', max + 'px' ); |
|
11 |
|
|
12 |
var product_links = $( '.bws_product_links' ); |
|
13 |
max = 0; |
|
14 |
$( product_links ).each( function () { |
|
15 |
if ( $( this ).innerHeight() > max ) |
|
16 |
max = $( this ).innerHeight(); |
|
17 |
}); |
|
18 |
max = max - parseInt( $( '.bws_product_links' ).css( 'padding-top' ) ) - parseInt( $( '.bws_product_links' ).css( 'padding-bottom' ) ); |
|
19 |
$( '.bws_product_links' ).css( 'height', max + 'px' ); |
|
20 |
|
|
21 |
$( '.bws_product_box' ).hover( function() { |
|
22 |
if ( $( this ).children( '.bws_product' ).children( '.bws_product_content' ).children( '.bws_product_description' ).length > 0 ) { |
|
23 |
$( this ).children( '.bws_product' ).addClass( 'bws_product_pro' ); |
|
24 |
$( this ).children( '.bws_product' ).children( '.bws_product_content' ).children( '.bws_product_description' ).css( 'display', 'block' ); |
|
25 |
$( this ).children( '.bws_product' ).children( '.bws_product_content' ).children( '.bws_product_icon' ).css( 'display', 'none' ); |
|
26 |
$( this ).children( '.bws_product' ).children( '.bws_product_button' ).css( 'display', 'inline-block' ); |
|
27 |
} |
|
28 |
}, function() { |
|
29 |
if ( $( this ).children( '.bws_product' ).children( '.bws_product_content' ).children( '.bws_product_description' ).length > 0 ) { |
|
30 |
$( this ).children( '.bws_product' ).removeClass( 'bws_product_pro' ); |
|
31 |
$( this ).children( '.bws_product' ).children( '.bws_product_content' ).children( '.bws_product_description' ).css( 'display', 'none' ); |
|
32 |
$( this ).children( '.bws_product' ).children( '.bws_product_content' ).children( '.bws_product_icon' ).css( 'display', 'block' ); |
|
33 |
$( this ).children( '.bws_product' ).children( '.bws_product_button' ).css( 'display', 'none' ); |
|
34 |
} |
|
35 |
}); |
|
36 |
|
|
37 |
/* old version */ |
|
38 |
if ( $( 'input[name="bwsmn_form_email"]' ).val() == '' ) { |
|
39 |
$( '.bws_system_info_meta_box .inside' ).css( 'display', 'none' ); |
|
40 |
} |
|
41 |
|
|
42 |
$( '.bws_system_info_meta_box .hndle' ).click( function() { |
|
43 |
if ( $( '.bws_system_info_meta_box .inside' ).is( ':visible' ) ) { |
|
44 |
$( '.bws_system_info_meta_box .inside' ).css( 'display', 'none' ); |
|
45 |
} else { |
|
46 |
$( '.bws_system_info_meta_box .inside' ).css( 'display', 'block' ); |
|
47 |
} |
|
48 |
}); |
|
49 |
|
|
50 |
$( '.bws_system_info_meta_box .handlediv' ).click( function() { |
|
51 |
if ( $( '.bws_system_info_meta_box .inside' ).is( ':visible' ) ) { |
|
52 |
$( '.bws_system_info_meta_box .inside' ).css( 'display', 'none' ); |
|
53 |
} else { |
|
54 |
$( '.bws_system_info_meta_box .inside' ).css( 'display', 'block' ); |
|
55 |
} |
|
56 |
}); |
|
57 |
}); |
|
58 |
})(jQuery); |