var lang = "ro";

var url = window.top.location.toString();
var pageHash = unescape(self.document.location.hash.substring(1));

var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
var IE7 = false /*@cc_on || @_jscript_version == 5.7 @*/;
var isMSIE = /*@cc_on!@*/false;
try {document.execCommand("BackgroundImageCache", false, true);} catch(err) {}

//This function is used to put a unique number at the end of each ajax call to prevent ie from caching it.
var nocache = function(url) {
	var rand = Math.floor(Math.random()*8999999999)+1000000000;
	url = url + (url.indexOf("?") == -1?'?nocache=':'&nocache=') + rand;
	return url;
};

$(function(){
	//	disable caching of AJAX responses
	$.ajaxSetup ({
		cache: false
	});

	//	sets links with the rel of "blank" to open in a new window
	$('a[rel$="blank"]').attr('target', '_blank'); 
	
	//	printing articles
	$('.printing').bind('click', function(){
		window.print();
		return false;
	});

	//	animated scrolling for same page links
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});

	//	slide to content
	if($('[name=slide2content]').length > 0) {
		$('html,body').animate({scrollTop: 245}, 1000);
	}

	//	image link fade-in animation
	$('a.linkfade').each(function(){
		$(this).hover(function() {
			
		}, function() {
			$(this).stop().animate({opacity: 0.5}, 100);
			$(this).animate({opacity: 1}, 300);
		});
	});
	
	//	Site Initialization
//	rt100.init();
//	rt100.info("rt100.init()");
});

$(document).ready(function () {
	rt100.log("document ready")
});
$(window).load(function () {
	rt100.log("window onload")
});
