2013-09-30 13:03:38 +00:00
|
|
|
var banners = [];
|
|
|
|
var banner_index = 0;
|
|
|
|
|
2011-10-21 06:11:41 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
$.each($(".dymanic_load"),function(){
|
2011-12-23 10:34:21 +00:00
|
|
|
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
|
|
|
if($(this).attr("path")!=''){
|
2013-09-30 13:03:38 +00:00
|
|
|
if($(this).attr("path").indexOf("show_banner")>0){
|
|
|
|
ajax_load_proc($(this),$(this).attr("path"),"true");
|
|
|
|
}else{
|
|
|
|
ajax_load_proc($(this),$(this).attr("path"),$(this).attr("path"));
|
2011-12-23 10:34:21 +00:00
|
|
|
}
|
2013-09-30 13:03:38 +00:00
|
|
|
}});
|
2011-11-19 17:26:24 +00:00
|
|
|
$("#main_content").addClass("module");
|
2013-09-30 13:03:38 +00:00
|
|
|
});
|
2011-12-23 10:34:21 +00:00
|
|
|
|
2013-09-30 13:03:38 +00:00
|
|
|
function ajax_load_proc(wapper,url,isBanner){
|
2012-12-24 07:22:26 +00:00
|
|
|
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
2013-09-30 13:03:38 +00:00
|
|
|
if (textSta == 'success') {
|
|
|
|
if(isBanner=="true"){
|
|
|
|
wapper.html(respText);
|
2013-10-02 07:51:22 +00:00
|
|
|
BannerCycle();
|
2013-09-30 13:03:38 +00:00
|
|
|
}else{
|
|
|
|
wapper.html(respText);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
if(textSta == 'error')
|
|
|
|
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function BannerCycle(){
|
|
|
|
var banner = banners[banner_index];
|
|
|
|
banner_index++;
|
2013-10-02 07:51:22 +00:00
|
|
|
$.getScript('/static/jquery.cycle.all.latest.js', function(){
|
|
|
|
$(banner.banner_name).ready(function() {
|
|
|
|
$(banner.banner_name).cycle({
|
|
|
|
delay: -1000,
|
|
|
|
fx: banner.banner_fx,
|
|
|
|
timeoutFn: getTimeout,
|
|
|
|
pager: banner.banner_pager,
|
|
|
|
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
|
|
|
|
});
|
2013-09-30 13:03:38 +00:00
|
|
|
});
|
2013-10-02 07:51:22 +00:00
|
|
|
});
|
2012-02-10 02:50:03 +00:00
|
|
|
}
|
2012-02-27 09:48:30 +00:00
|
|
|
|
|
|
|
// Ad Banner FX code [start]
|
|
|
|
function getTimeout() {
|
|
|
|
return $(this).attr('time_to_next');
|
2012-02-10 02:50:03 +00:00
|
|
|
}
|
2012-02-27 09:48:30 +00:00
|
|
|
|
2012-02-10 02:50:03 +00:00
|
|
|
$(document).ready(function() {
|
2013-01-06 16:36:48 +00:00
|
|
|
$(document).on('click', '.slideshow img', function()
|
2012-02-10 02:50:03 +00:00
|
|
|
{
|
2012-08-13 03:03:11 +00:00
|
|
|
if($(this).attr('link_url')!='')
|
2012-02-10 02:50:03 +00:00
|
|
|
{
|
2012-08-13 03:03:11 +00:00
|
|
|
if($(this).attr('link_open')=='new_window')
|
|
|
|
{
|
|
|
|
window.open($(this).attr('link_url'));
|
2012-02-10 02:50:03 +00:00
|
|
|
}
|
2012-08-13 03:03:11 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
document.location.href=$(this).attr('link_url')
|
2012-02-10 02:50:03 +00:00
|
|
|
}
|
2012-08-13 03:03:11 +00:00
|
|
|
}
|
2012-02-10 02:50:03 +00:00
|
|
|
})
|
|
|
|
});
|
2012-02-19 09:43:47 +00:00
|
|
|
// Ad Banner FX code [end]
|