$(document).ready(function() {
		
    $("img:regex(id, .*_btn)").hover(
		function() {
		    this.src = this.src.replace("_n", "_r");
		},
		function() {
		    this.src = this.src.replace("_r", "_n");
		}
	);

    var pathname = window.location.pathname;
    if (pathname.match("designfest09/about")) {
        $("#about_btn").unbind();
        $("#about_btn").attr("src", "images/about_btn_r.jpg");
		//alert(pathname);
    } else if (pathname.match("designfest09/event")) {
        $("#events_btn").unbind();
        $("#events_btn").attr("src", "images/events_btn_r.jpg");
		
    } else if (pathname.match("designfest09/design")) {
        $("#designtrails_btn").unbind();
        $("#designtrails_btn").attr("src", "images/designtrails_btn_r.jpg");
		
    } else if (pathname.match("designfest09/touch")) {
        $("#touchpoints_btn").unbind();
        $("#touchpoints_btn").attr("src", "images/touchpoints_btn_r.jpg");
		
    } else if (pathname.match("designfest09/sponsor")) {
        $("#sponsors_btn").unbind();
        $("#sponsors_btn").attr("src", "images/sponsors_btn_r.jpg");
		
    } else if (pathname.match("designfest09/press")) {
        $("#press_btn").unbind();
        $("#press_btn").attr("src", "images/press_btn_r.jpg");
    } else if (pathname.match("designfest09/contact")) {
        $("#contact_btn").unbind();
        $("#contact_btn").attr("src", "images/contact_btn_r.jpg");
		
    }

    
	
	
	/*--------------- sponsors.aspx navigation ------------------*/
	
	var url=window.location.href;
	
	
	var currentID = getParameter(url,'id');
	//alert(currentID);
	
	if (currentID=="52"){
	    $("#partners").css({ 'color': '#9a9a9a' });
	    $(".push").css({ 'margin-bottom': '20px' });
		
	}
	else if (currentID=="54"){
		$("#sponsors").css({'color':'#9a9a9a'});
		
	}
	else if (currentID=="56"){
		$("#supporters").css({'color':'#9a9a9a'});
		
	}
	
	else if(currentID=="64"){
		$("#copyrightFont").css({'padding-left':'0'});
	}

	//$("#newhtml").css({ 'height': $(window.document).height()-50 });
});
/* get parameters from the string, example: get the id out of it */

function getParameter ( queryString, parameterName ) {
	// Add "=" to the parameter name (i.e. parameterName=value)
	var parameterName = parameterName + "=";
	if ( queryString.length > 0 ) {
	// Find the beginning of the string
	begin = queryString.indexOf ( parameterName );
	// If the parameter name is not found, skip it, otherwise return the value
	if ( begin != -1 ) {
	// Add the length (integer) to the beginning
	begin += parameterName.length;
	// Multiple parameters are separated by the "&" sign
	end = queryString.indexOf ( "&" , begin );
	if ( end == -1 ) {
	end = queryString.length
}
	// Return the string
	return unescape ( queryString.substring ( begin, end ) );
}
	// Return "null" if no parameter has been found
	return "null";
}
}	



function testtest(tempstr) {
    //alert(tempstr);
}
