jQuery(function($) {
//alert('here');
	$("div[class^='clear']").removeAttr("class");
	$(".site .image").attr({style:"padding-right:20px;padding-bottom:14px"});
	$(".site .info").attr({style:"position:absolute;top:-300px;left:-9999px;visibility:hidden;"});
	$(".url").attr({style:"display:inline;"});

	// used by the content fader
/*	$("a[rel^='fader']").click(function(event){
		$.ajax({
			type: "GET",
			url: event.target.href,
			data: "ajax=1",
			success: function(msg)
			{
				$("#contentHolder").hide();
				$("#contentHolder").html(msg);
//				if(event.target.href.match(/.+\/web-design\/index\.php/)) {$("#phone-number2").show();$("#phone-number").hide();}
//				else {alert("here");$("#phone-number").show();$("#phone-number2").hide();}

				$("#contentHolder").fadeIn(250);
			}
		});
		
		// turn off the link with a currentPage id
		$("#currentPage").removeAttr("id");
		// turn on the link we just clicked with a currentPage id
		$(event.target).attr({id:"currentPage"});

		// we don't want them to go there if this works		
		return false;
	});
*/	
	// used by slimbox/lightbox
	$("a[rel^='lightbox']").slimbox({counterText:false},
	function(el) { // link mapper
		// grabs the img name and turns it into <img>Large.jpg for the src (first one)
		var elSrc='/img/portfolio/' + el.firstChild.src.replace(/.+\/portfolio\/(.+)\.gif/,'$1Large.jpg');
		
		// then generate the title from the link title and grab the text from the alt tag for the thumbnail
//		var elTitle=el.parent.firstChild.innerHTML;
//var elTitle="test";
//		alert($("div[rel^='name-' + el.title)");
		var elTitle='<h4>' + el.title + '</h4> <div class=\'url2\'> &rarr; <a href="' + el.href + '" target="_blank">' + el.href.replace(/.+\/www\.(.+)\//,'$1') + '</a></div>';
		elTitle+='<p>' + el.firstChild.alt + '</p>';
		
		return [elSrc, elTitle];
	}, function(el) {
		return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
	});
});