Orbit/public/static/kernel.js

43 lines
1.0 KiB
JavaScript

$(document).ready(function() {
$('body').prepend("<div id='orbit_bar'/>");
ajax_load_proc($('#orbit_bar'), '/load_orbit_bar');
$.each($(".dymanic_load"),function(){
if($(this).attr("path")==''){$(this).html("App setting Failed");}
if($(this).attr("path")!=''){
ajax_load_proc($(this),$(this).attr("path"));
}
}
);
$("#main_content").addClass("module");
});
function ajax_load_proc(wapper,url){
wapper.load(url,function(respText,textSta,XML){
if(textSta == 'error')
wapper.html("Loading Failed");
});
}
// Ad Banner FX code [start]
function onAfter(e) {
var parent = $(this).parent();
var time_to_next = $(this).attr('time_to_next');
parent.cycle('pause');
setTimeout(function(){parent.cycle('resume')},time_to_next);
}
$(document).ready(function() {
$('.slideshow').children('img').click(function()
{
if($(this).attr('link_open')=='new_window')
{
window.open($(this).attr('link_url'));
}
else
{
document.location.href=$(this).attr('link_url')
}
})
});
// Ad Banner FX code [end]