/*
	Digibrand`s Javascript API
	---------------------------------------------------------
	Author: Edgars
	Version: 1.0.1 beta
	Under the Digibrand development Licenses
	http://www.digibrand.lv/license.txt
	Requires jQuery 1.4.0 or later
	http://www.jquery.com/
*/

var Api = {
	load	:	function(n){
		var a = document.createElement('script');
		a.type = 'text/javascript';
		a.src = root+'js/api/'+n+'.js';
		document.getElementsByTagName('head')[0].appendChild(a);
		if(typeof console != 'undefined' && typeof console.info == 'function'){
			console.info('Javascript API - '+n+' library loaded');
		}
	},
	css	:	function(n){
		var a = document.createElement('link');
		a.type = 'text/css';
		a.rel = 'stylesheet';
		a.media = 'screen';
		a.href = root+'css/'+n+'.css';
		document.getElementsByTagName('head')[0].appendChild(a);
		if(typeof console != 'undefined' && typeof console.info == 'function'){
			console.info('Javascript API - '+n+' Style Sheet loaded');
		}
	},
	background	:	function(e){
		$('body').css({'background-repeat':'no-repeat','background-position':'top center','background-color':'#fff','background-image':"url('"+root+"/"+e+"')"});
	},
	core				:	{
		notes		:	new Object,
		scroll	:	function(a,b){
			if(!a) { a = $('body'); }
			if(!b) { b = 1000; }
			if($(a).size()){
				$('html,body').animate({scrollTop: a.offset().top}, b);
			}
		}
	}
};
$(function(){
	if($.browser.msie && $.browser.version == 8){
		$('td a',$('.menu:first')).each(function(){
			$(this).css({'height':'43px'});
		});
	}
});
