.id
4447
.gutitle
bn_utils_script
.title
bn_utils_script
.file
.extension
.name
|/routinetype-script|
.user_id
7
.notes
.body
<!--- optionally, include js headers --->
<if isdefined("att.headers") AND att.headers EQ 1>
<tag.js_headers expires="90">
</if>


<tag.function_jquery>


<!--- output javascript statements --->
$(document).ready(function() {

$('##bullhelper_shortform').each(function() {

// $(this).find('.submit').hide();

$(this).find('select:first').bind('change', function() {

var _v = jQuery.trim($(this).val());

if (_v !== '') {
window.location = 'http://smallerpage.com/bulliten_helper/' + _v;
}

});

});


$('.select_this:last').select();






$('##media_player_audio:first').each(function() {

var Obj = {
// fullscreen button not needed here
plugins: {
controls: {
fullscreen: false,
height: 30,
autoHide: false
}
},

clip: {
autoPlay: true
}
}

flowplayer("media_player_audio","http://#this_domain#/fp.3.2.5/flowplayer-3.2.5.swf", Obj);

});

$('##media_player_video:first').each(function() {

var Obj = {}

flowplayer("media_player_video","http://#this_domain#/fp.3.2.5/flowplayer-3.2.5.swf", Obj);

});




$('##blabber').each(function() {

$(this).find('##blabber_balloon').hide();
$(this).find('##blabber_btn').find('a').click(function() {
$(this).parents('form:first').submit();
return false;
});

this.default_val = $(this).find('input##blabber_default_text').val();

this.show_default = function() {
$(this).find('textarea').css('color','##999');
var _v = jQuery.trim($(this).find('textarea').val());
if (_v == '' || _v == this.default_val) {
$(this).find('textarea').val(this.default_val);
}
}

this.hide_default = function() {
$(this).find('textarea').css('color','##404040');
var _v = jQuery.trim($(this).find('textarea').val());
if (_v == '' || _v == this.default_val) {
$(this).find('textarea').val('');
}
}

var _v = jQuery.trim($(this).find('textarea').val());
if (_v == '' || _v == this.default_val) {
this.show_default();
}

var _ta = $(this).find('textarea')[0];

$(_ta).focus(function() {
var that = $(this).parents('##blabber')[0];
var _v = jQuery.trim($(this).val());
if (_v == '' || _v == that.default_val) {
that.hide_default();
}
});

$(_ta).blur(function() {
var that = $(this).parents('##blabber')[0];
var _v = jQuery.trim($(this).val());
if (_v == '' || _v == that.default_val) {
that.show_default();
}
});

if ( $(this).hasClass('blabber_selected') ) {
$(_ta).val('');
$(_ta).focus();
}

$(this).find('form').submit(function() {
var _v = jQuery.trim($(this).find('textarea').val());
var _default_v = $(this).parents('##blabber:first')[0].default_val;
if ( _v == _default_v || _v == '' ) {
return false;
}
});

});



$('.plus_ex').each(function() {

this.latest_val = '';
this.restore_val = 0;
if ($(this).children('.ex:first').find('input,textarea,select').val() !== '') {
this.restore_val = 1; // initialized with value, so user will expect it to be restored.
}

$(this).children('.plus').find('.btn').click(function() {
var el = $(this).parents('.plus_ex:first')[0];
$(el).children('.plus').hide();
$(el).children('.ex').show();
if (el.restore_val == 1) {
$(el).children('.ex').find('input,textarea,select').val(el.latest_val);
}
$(el).children('.ex').find('input,textarea,select').select();
});

$(this).children('.ex').find('.btn').click(function() {
var el = $(this).parents('.plus_ex:first')[0];
$(el).children('.plus').show();
$(el).children('.ex').hide();
el.latest_val = $(el).children('.ex').find('input,textarea,select').val();
$(el).children('.ex').find('input,textarea,select').val('');
});

});

$('.balloon_color_picker').change(function() {
var _color = $(this).val();
$('.balloon_color_picker_pic').find('.balloon').find('img').each(function() {
this.src = this.src.replace(/balloon_[a-z_]+/,'balloon_' + _color);
});
});

});




<tag.function_flowplayer>
 
.sum_double
0.00
.producttype
.productincludes
.physical_unsignedint
0
.isprotected_unsignedint
0
.overridesiteheader_unsignedint
0