function setActiveService(id)
{
      var object = $('service-name');
      for (var childItem in object.childNodes) 
		{
      	if (object.childNodes[childItem].nodeType == 1)
      	object.childNodes[childItem].style.display = "none";
      }
		$('service'+id).style.display = "block";
}

jQuery.preloadImages = function()  
{  
    for(var i = 0; i < arguments.length; i++)  
    {  
        $("<img>").attr("src", arguments[i]);  
    }  
}; 

function ajaxLoadImgWithHref(id, url_str)
{
	$("#work_img").animate({height: 'hide'}, 300);
	jQuery.ajax({
   type: "GET",
  	url: url_str,
   success: function(img){ 
   	$("#work_img img").attr("src", img);
   	setTimeout(function(){ 
   		$("#work_img").css("display", "inline");
   		$("#work_img").animate({height: 'show'}, 300);
   	}, 20);	
   	
   	}
   });	

} 
  
function dynChangePortfolio(id, url)
{	
	$(document).ready(function() {
      setInterval('ajaxLoadImgWithHref("'+id+'", "'+url+'")', 5000);
 	});
}

$(document).ready(function() 
{ 
})
