function getNodeValue(nodeName) {
	return $('.' + nodeName).html();
}
function getNodeValueAsString(nodeName) {
	return $('.' + nodeName).text();
}

function getAttrValue(nodeName,attributeName) {
	return $('.' + nodeName).attr(attributeName);
}

var running_p = false;
var image_size= 0;
var called = 0;
var link_html = '';
var name_placeholder = '';
var replaced = false;

$(document).ready(function() {
	
	
	// functions to allow flash communication
	function thisMovie(movieName) {
	    if (navigator.appName.indexOf("Microsoft") != -1) {
	        return window[movieName];
	    } else {
	        return document[movieName];
	    }
	}
	
	function flashSetHref(value) {
		thisMovie("hubSlider").flashSetHref(value);
	}
	
	
	var doc = $(this);
	remove_skype_addons();
	$('.homepage_slider_block').remove();
	//$('span.homepage_slider_block_title_line').css('border-bottom','none')
	
	
	var options = { newsList: "#newsticker ul",startDelay: 10,placeHolder1: " ",loopDelay: 3000,controls: false};
	
	$('div.slogan').html("");
	
	var url2 = window.location.href.split('?');
	
	$.post(url2[0],{newstickerajax: 'true', url: url2[0] },function(data){
		$('div.slogan',doc).html(data);
		$('.news_ticker_dots').css('font-weight','bold');
		$().newsTicker(options);
	});

	$('li.awardsItem a').click(function(event) {
		event.preventDefault();
	});
	
	$('li.awardsItem').hover(function() {
		$('li.awardsItem',document).removeClass('selected_awards_item');
		$('div.awards_image img',doc).attr('src',$(this).attr('title'));
		$(this).addClass('selected_awards_item');
	});
	
	$('li.project_image_list_item').hover(function() {
		$('a.project_detail_image img',doc).attr('src',$(this).attr('title'));
	});
	
	$('a.homepageHubItemLink').click(function(event){
		event.preventDefault();
		flashSetHref($(this).attr('href'));
		$('li.hubItem',doc).removeClass('current_hub');
		$(this).parent().addClass('current_hub');
	});
	
	
	
});

function remove_skype_addons() {
	
	var f = $(document).find('.skype_pnh_container');
	if(f.length > 0) {
		$('.skype_pnh_container').remove();
		$('.skype_pnh_print_container').addClass('contact_email_link');
		$('.skype_pnh_print_container').removeClass('skype_pnh_print_container');
	} else {
		window.setTimeout(remove_skype_addons, 5);
	}
}


function flashSetHref(href) {}

