// default.js Theme specific Javascript
/*jQuery(function() {
	jQuery("#lectionary p").fadeOut();
	jQuery('#lectionary h3').click(function(){
		if (jQuery("#lectionary p").is(":hidden")) {
			jQuery("#lectionary p").fadeIn();
		} else {
			jQuery("#lectionary p").fadeOut();
		}
	});
});
*/
jQuery(function() {
//Start: Simple Advert
var simple_ad_count = 1;
var simple_ad_url = "http://adn.variedmedia.net/fast/ajax.php?";

$('div[rel=simple_advert]').each(function(){
	simple_ad_url = simple_ad_url + "simple_ad_" + simple_ad_count + "=" + $(this).attr('id') + "&";
	simple_ad_count++;
});
simple_ad_url = simple_ad_url + "simple_ad_count=" + simple_ad_count + "&callback=?";
	
$.getJSON(simple_ad_url,{}, function(simple_ad_json){
	if(simple_ad_json.status == 1){
		$.each(simple_ad_json.adverts,function(k,v){
			if(v != 'none'){
				$('#'+k).empty();
				$('#'+k).append(v);
			}
		});
	}
});
//End: Simple Advert
});
