var banners = [];
var banner_index = 0;

$(document).ready(function() {
	$.each($(".dymanic_load"),function(){
		if($(this).attr("path")==''){
			$(this).html("");
		}else{
			ajax_load_proc($(this),$(this).attr("path")); 	
		}
	});

	$("#main_content").addClass("module");
});

function ajax_load_proc(wapper,url,isBanner){
	$.get(encodeURI(url), {}, function(respText,textSta,XML){ 
		if (textSta == 'success') {
			if (respText.indexOf('<meta charset="utf-8">') == -1) wapper.html(respText);
		};
		if(textSta == 'error')
			wapper.html("Loading Failed<br/>  <a href='"+$(this).attr('path')+"'>Go See</a>");
	});
}

$(document).ready(function() { 
	$(document).on('click', '.orbit-cycle-slideshow img', function()
	{
		if($(this).attr('link_url')!='')
		{
			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]