| 1 |
|
| 2 |
if (Drupal.jsEnabled) {
|
| 3 |
$(document).ready(function() {
|
| 4 |
|
| 5 |
$('.ff_clear_link').each(function() {
|
| 6 |
var el = $(this);
|
| 7 |
el.mousedown(function(){return false;});
|
| 8 |
});
|
| 9 |
|
| 10 |
$('.form-item .description').hover(
|
| 11 |
function(){$(this).addClass('description-hover');},
|
| 12 |
function(){$(this).removeClass('description-hover');}
|
| 13 |
);
|
| 14 |
|
| 15 |
if (nx_ie_version == 6) {
|
| 16 |
$('.tabs_pri li').hover(
|
| 17 |
function(){$(this).addClass('hover');},
|
| 18 |
function(){$(this).removeClass('hover');}
|
| 19 |
);
|
| 20 |
}
|
| 21 |
|
| 22 |
/* --- [EN] PNG Fix (for IE6) ------------------------------------------------------------- */
|
| 23 |
|
| 24 |
if (nx_ie_version == 6 && nx_png_fix_mode) {
|
| 25 |
$(document).find("img[@src$=.png]").each(function() {
|
| 26 |
var png_img = $(this),
|
| 27 |
old_src = png_img.attr('src');
|
| 28 |
png_img.css('width', png_img.width() + 'px');
|
| 29 |
png_img.css('height', png_img.height() + 'px');
|
| 30 |
png_img.attr('src', nx_empty_gif_path);
|
| 31 |
png_img.get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + old_src + '\', sizingMethod=\'scale\');';
|
| 32 |
});
|
| 33 |
}
|
| 34 |
|
| 35 |
/* --- [EN] Hints ------------------------------------------------------------------------- */
|
| 36 |
|
| 37 |
set_hint('#search-block-form #edit-search-block-form-1');
|
| 38 |
set_hint('#user-login-form #edit-name');
|
| 39 |
set_hint('#user-login-form #edit-pass');
|
| 40 |
|
| 41 |
/* --- [EN] Example of cookie usage -------------------------------------------------------
|
| 42 |
$.cookie('nx_param1', 'value1', {expires: 1000, path: '/'}); // for setting cookie value
|
| 43 |
var nx_param1 = $.cookie('nx_param1'); // for getting cookie value
|
| 44 |
---------------------------------------------------------------------------------------- */
|
| 45 |
|
| 46 |
});
|
| 47 |
}
|
| 48 |
|
| 49 |
/* --- [EN] FUNCTIONS --------------------------------------------------------------------- */
|
| 50 |
|
| 51 |
function set_hint(element_path){
|
| 52 |
try {
|
| 53 |
var element = $(element_path);
|
| 54 |
element.focus(nx_hint_show);
|
| 55 |
element.blur(nx_hint_hide);
|
| 56 |
nx_hint_hide.call(element);
|
| 57 |
} catch(e){}
|
| 58 |
}
|
| 59 |
|
| 60 |
function nx_hint_show(){
|
| 61 |
if ($(this).attr('value') == '') {
|
| 62 |
$(this).removeClass($(this).attr('id')+'-Hint');
|
| 63 |
}
|
| 64 |
}
|
| 65 |
|
| 66 |
function nx_hint_hide(){
|
| 67 |
if ($(this).attr('value') == '') {
|
| 68 |
$(this).addClass($(this).attr('id')+'-Hint');
|
| 69 |
}
|
| 70 |
}
|
| 71 |
|