jQuery(document).ready(function() {
jQuery("#recentPostsLI ul li a").prepend("<span class='arrows'>&#9658</span>");
jQuery("#recentPostsLI ul").css("display","none");
jQuery(".collapsCatList").css("display","none");
jQuery("#months").css("display","none");
jQuery("#month").prepend("<span class='arrows'>&#9658</span>");
jQuery("#recent").prepend("<span class='arrows'>&#9658</span>");
jQuery(".collapsArchPost a").prepend("<span class='arrows'>&#9658</span>");

jQuery("#cat").prepend("<span class='arrows'>&#9658</span>");

//jQuery("#cat").css("color","#ff0000");

});

function initFooter() {
	// Footer events
	jQuery("#footer a img, #footer :image").hover(function () {
		this.src = this.src.replace(/CCCCCC/, "FF0000");
	}, function () {
		this.src = this.src.replace(/FF0000/, "CCCCCC");
	});

	jQuery("#search input.search").focus(function () {
		if (this.value == "Search BrandLogic") {
			this.value = "";
		}
	}).blur(function () {
		if (this.value.length === 0) {
			this.value = "Search BrandLogic";
		}
	});

	jQuery("#search a.submit").click(function () {
		window.location = $("#search").attr("action") + "-" + encodeURIComponent(jQuery("#search input.search").val());
		return false;
	});
	
	jQuery("#clientAccess input.client").focus(function () {
		if (this.value == "Client login name") {
			this.value = "";
		}
	}).blur(function () {
		if (this.value.length === 0) {
			this.value = "Client login name";
		}
	});
}


function addArrows(whichone){
if(jQuery("#" + whichone).hasClass("notSelected")){
var parent = jQuery("#"+whichone).parent();
jQuery(parent).children().children().css("display","block");
jQuery("#" + whichone + " .arrows").html("&#9660").css("display","inline");
jQuery("#" + whichone).css("color","#ff0000");
jQuery("#" + whichone).removeClass("notSelected");
jQuery("#" + whichone).addClass("Selected");
}
else{
var parent = jQuery("#"+whichone).parent();
jQuery(parent).children().children().css("display","none");
jQuery("#" + whichone + " .arrows").html("&#9658").css("display","inline");
jQuery("#" + whichone).css("color","#999");
jQuery("#" + whichone).removeClass("Selected");
jQuery("#" + whichone).addClass("notSelected");
}
}


