This is some sample text
var ctl15_ctl00_ctl00json = {"imageUrl":"/images/blobs/animation/example.jpg","text":"Boating Blog","textSize":"100","picSize":"None","_loop":"1","animation":"flash","duration":"4","delay":"0","pageSelected":"1035855","center":"0","textColor":"Gray","border":"0","showWhileWaiting":"0","beforeFirstShowing":"show","beforeSubsequentShowings":"show","link":"http://planb.talkspot.com/blog"};
$(document).ready(function () {
ctl15_ctl00_ctl00setInitialParameters();
});
function ctl15_ctl00_ctl00testAnim() {
$('#ctl15_ctl00_ctl00animationSandbox').removeClass().addClass(ctl15_ctl00_ctl00json.animation + ' ts-animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
$(this).removeClass();
});
};
function ctl15_ctl00_ctl00setInitialParameters() {
$('#ctl15_ctl00_ctl00animationSandbox img').attr('src', ctl15_ctl00_ctl00json.imageUrl);
var text = ctl15_ctl00_ctl00json.text;
if ((text == null)) {
$('#ctl15_ctl00_ctl00animationText').hide();
}
else {
text = text.replace(/\n/gm, '
');
$('#ctl15_ctl00_ctl00animationText').html(text);
$('#ctl15_ctl00_ctl00animationSandbox h4').css('font-size', ctl15_ctl00_ctl00json.textSize + 'px');
$('#ctl15_ctl00_ctl00animationText').css('color', ctl15_ctl00_ctl00json.textColor);
}
if (ctl15_ctl00_ctl00json.picSize == 'None') {
$('#ctl15_ctl00_ctl00animationSandbox img').hide();
}
else {
// #310 Bug Fix, animation images not responsive
$('#ctl15_ctl00_ctl00animationSandbox img').css('max-width', ctl15_ctl00_ctl00json.picSize + 'px');
$('#ctl15_ctl00_ctl00animationSandbox img').css('height', 'auto');
$('#ctl15_ctl00_ctl00animationSandbox img').css('width', '100%');
}
ctl15_ctl00_ctl00setAttributes('duration', '' + ctl15_ctl00_ctl00json.duration + 's');
ctl15_ctl00_ctl00delayedStart(ctl15_ctl00_ctl00json.delay)
if (ctl15_ctl00_ctl00json.border == '0') {
}
else {
var borderParameter = '' + ctl15_ctl00_ctl00json.border + 'px solid ' + ctl15_ctl00_ctl00json.textColor;
$('#ctl15_ctl00_ctl00animationSandbox').css('border', borderParameter);
$('#ctl15_ctl00_ctl00animationSandbox').css('padding', '8px');
}
var animation = ctl15_ctl00_ctl00json.animation;
if (ctl15_ctl00_ctl00json.pageSelected == 0) {
}
else {
if (ctl15_ctl00_ctl00json.Link == '') {
return false;
}
else {
$('#ctl15_ctl00_ctl00animationSandbox').css('cursor', 'pointer');
$('#ctl15_ctl00_ctl00animationSandbox').click(function () {
$(this).fadeOut(1000);
location.assign(ctl15_ctl00_ctl00json.link);
return false;
});
}
}
if (ctl15_ctl00_ctl00json.center == '1') {
var as = $('#ctl15_ctl00_ctl00animationSandbox');
var p = as.detach();
p.appendTo('body');
as.css({
'position': 'fixed',
'left': '50%',
'top': '50%'
});
as.css({
'margin-left': -as.outerWidth() / 2 + 'px',
'margin-top': -as.outerHeight() / 2 + 'px'
});
}
if (ctl15_ctl00_ctl00json.beforeFirstShowing == 'show') {
$('#ctl15_ctl00_ctl00animationSandbox').show();
}
}
function ctl15_ctl00_ctl00delayedStart(wait) {
setTimeout(ctl15_ctl00_ctl00delayedStartDoIt, wait * 1000)
}
function ctl15_ctl00_ctl00delayedStartDoIt() {
// Always show the animation itself
$('#ctl15_ctl00_ctl00animationSandbox').show();
ctl15_ctl00_ctl00testAnim();
// set a timer which will tell us when the animation completes (we hope)
setTimeout(ctl15_ctl00_ctl00delayedStartDoItAgain, ctl15_ctl00_ctl00json.duration * 1000)
}
function ctl15_ctl00_ctl00delayedStartDoItAgain() {
// an animation just completed
if (ctl15_ctl00_ctl00json.beforeSubsequentShowings == "noshow") {
$('#ctl15_ctl00_ctl00animationSandbox').fadeOut(200);
}
// if we only do this once -- we are done
if (ctl15_ctl00_ctl00json._loop == '1') {
return;
}
var wait = $('#ctl15_ctl00_ctl00').val();
if (ctl15_ctl00_ctl00json.beforeSubsequentShowings == 'skip') {
wait = 0; // no wait on subsequent showings
}
else {
if (ctl15_ctl00_ctl00json.beforeSubsequentShowings == 'show') {
}
else {
$('#ctl15_ctl00_ctl00animationSandbox').fadeOut(200);
}
}
ctl15_ctl00_ctl00delayedStart(wait);
}
function ctl15_ctl00_ctl00centerIt () {
$('#ctl15_ctl00_ctl00animationSandbox').css('position', 'fixed');
$('#ctl15_ctl00_ctl00animationSandbox').css('top', '50%');
$('#ctl15_ctl00_ctl00animationSandbox').css('left', '50%');
$('#ctl15_ctl00_ctl00animationSandbox').center();
}
function ctl15_ctl00_ctl00setAttributes(what, value) {
//#yourElement {
// -vendor-animation-duration: 3s;
//-vendor-animation-delay: 2s;
//-vendor-animation-iteration-count: infinite;
//}
ctl15_ctl00_ctl00setAttribute('moz', what, value);
ctl15_ctl00_ctl00setAttribute('o', what, value);
ctl15_ctl00_ctl00setAttribute('webkit', what, value);
ctl15_ctl00_ctl00setAttribute('ms', what, value);
}
function ctl15_ctl00_ctl00setAttribute(browser, what, value) {
var part1 = '-' + browser + '-animation-' + what;
var part2 = value;
//alert(part1);
//alert(part2);
$('#ctl15_ctl00_ctl00animationSandbox').css(part1, value);
}