<!--- optionally, include js headers --->
<if isdefined("att.headers") AND att.headers EQ 1>
<tag.js_headers expires="90">
</if>
<tag.function_jquery>
<tag.function_flowplayer>
<!--- output javascript statements --->
$(document).ready(function() {
<tag.jx_script_joelie_bar>
$('.select_this:last').select();
$('.focus_this:last').each(function() { if(this.has_focus == 0) { this.focus(); } /* is something wrong with $.focus() ? */ });
$('##the_joelie_form').submit(function() {
window.location = 'http://' + document.domain + '/j:' + jQuery.trim($('##the_joelie_input').val()).toLowerCase();
return false;
});
$('##media_player_audio').each(function() {
var _autoplay = true;
if ($(this).hasClass('no_autoplay')) {
var _autoplay = false;
}
var Obj = {
// fullscreen button not needed here
plugins: {
controls: {
fullscreen: false,
height: 30,
autoHide: false
}
},
clip: {
autoPlay: _autoplay
}
}
flowplayer("media_player_audio","http://#this_domain#/fp.3.2.5/flowplayer-3.2.5.swf", Obj);
});
$('##media_player_video').each(function() {
var _autoplay = true;
if ($(this).hasClass('no_autoplay')) {
var _autoplay = false;
}
var Obj = {
clip: {
autoPlay: _autoplay
}
}
flowplayer("media_player_video","http://#this_domain#/fp.3.2.5/flowplayer-3.2.5.swf", Obj);
});
$('.delete_link').click(function() {
// each delete link is within a parent container called "otype-idnum"; the delete link itself should be called "delete:otype-idnum".
var pElId = this.id.replace('delete:','');
var c = confirm('Really delete? There is no undo.');
if (c == true) {
var _s = pElId.split('-');
var otype = _s[0];
var idnum = _s[1];
$.post('http://' + document.domain + '/?&siteformat=xml&elId=' + pElId, {'1_posttype':'delete','1_orb':otype,'1_where':otype + '.id = ' + idnum}, function(data) {
var _s = this.url.split('=');
var el = document.getElementById(_s[_s.length-1]);
var spacer_id = el.id + '-spacer';
$(el).slideUp(360);
$('##' + spacer_id).hide();
// how many records now match?
var _n = document.getElementById('num_records');
if (_n !== null) {
var num_records = $(_n).html();
var num_records = num_records - 1;
if (num_records == 1) {
var _txt = "Result";
}
else {
var _txt = "Results";
}
$(_n).html(num_records);
$('##records_match').html(_txt);
}
else {
// refresh page
window.location = window.location.toString();
}
});
}
return false;
});
$('.tbl_entry_field').bind('keyup blur change', function(e) {
var a = this.value;
var b = jQuery.trim(this.value.toLowerCase()).replace(/[^a-z_]/g,'').replace(/[_]+/g,'_').replace(/^_/,'');
if (a !== b) {
this.value = b;
}
});
// trap ctrl+e
if (typeof CLIENT_ID == 'number' && CLIENT_ID > 1) {
$(document).keydown(function(e) {
if (typeof e.keyCode == 'number' && e.keyCode == 69 && e.ctrlKey) {
window.open('http://' + document.domain + '/');
return false;
}
});
};
});
<tag.function_jfield>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19442168-4']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();