$(document).ready(function(){
	//Nav Hover Function 
	$("ul#nav li a").hover(function(){
		$(this).addClass("bolder");
		Cufon.replace('ul#nav li a.bolder', { fontFamily: 'Colaborate-Medium' });
		},	function () {
		    $(this).removeClass("bolder");
			Cufon.replace('ul#nav li a', { fontFamily: 'ColaborateLight' });
			
		});
	
        //Nav Width Styleing
        $("ul#nav li.category").each(function(intIndex){

                if(intIndex == 0){$(this).css({"width":"70px"});}
                if(intIndex == 1){$(this).css({"width":"155px"});}
                if(intIndex == 2){$(this).css({"width":"100px"});}
                if(intIndex == 3){$(this).css({"width":"240px"});}
                if(intIndex == 4){$(this).css({"width":"190px"});}
                if(intIndex == 5){$(this).css({"width":"70px"});}

        });

	$("#footer .links a:first").css({"border-right":"none"});	
	
	$(".hoverImg").hover(function() {
		$(this).attr("src", $(this).attr("src").split("1.").join("2."));
	}, function() {
		$(this).attr("src", $(this).attr("src").split("2.").join("1."));
	});


	$("#content-wrapper").append('<div id="preload" style="display: none;"></div>');
	$(".hoverImg").each(function(intIndex) {
		$("#preload").append('<img src="'+$(this).attr("src").split("1.").join("2.")+'" style="display: none;" />');
	});
	
        $("img").each(function() {
                if($(this).attr("src") == "" || $(this).attr("src") == "/"){
                        $(this).css({"display":"none"});
			$(this).css({"border":"none"});
                }
        });

	$("#oio-banner-1").css({"width":"200px"});
	$("#oio-banner-2").css({"width":"650px"});

	$('a.FB_Link').click(function(){
		$(this).attr({ target: "_blank" }); 
	});

	$("a").bind("focus",function(){
          if(this.blur)this.blur();
        });

//End Global
});

	
//	load() functions
	var banner1 = "oiopub/banners/banner1.php";
	var banner2 = "oiopub/banners/banner2.php";

	$.get(banner1, function(data){
   		$("#right-content .banner").prepend(data);
 	});

        $.get(banner2, function(data){
                $("#left-content .banner").prepend(data);
        });

	//$.ajax({
  	//	url: banner1,
  	//	success: function(data) {
    	//	$("#right-content .banner").append(data);
  	//	}
	//});

Cufon.replace('ul#nav li a', { fontFamily: 'ColaborateLight' });
Cufon.replace('h1', { fontFamily: 'Museo Slab 500' });
Cufon.replace('h2', { fontFamily: 'Museo Slab 500' });
Cufon.replace('h4', { fontFamily: 'Museo Slab 500' });
//Cufon.replace('#right-content h1', { fontFamily: 'Museo Slab 500' });

function ClearForm(name){ document.getElementById(name).value =''; }

