/*
	By CerebralArt
	**************
	Copyright 2008 Cerebral Art. All rights reserved.
	victor@cerebralart.ro
	
	!!! This file requires prototype.js and scriptaculous.js -> effects !!!
*/

// Enables script.aculo.us Effects
var withEffect = true;
// Load a CSS file if <> null
var cssFile = null;

var styles = new String();
styles = '<style type="text/css" media="screen"> ';
styles += 'body > #ByCerebralArt { position: fixed; } ';
styles += '#ByCerebralArt { position: fixed; right:0; bottom:1px; height: 52px; width:202px; } ';
styles += '#ByCerebralArtText { font-family: Verdana, Arial; font-size: 10px; color: #000; float: left; width: 150px; background-color: #3F2265; color: #fff; height: 52px; text-align: center; }';
styles += 'strong { font-size:12px }';
styles += ' </style>';

if(cssFile == null || cssFile == "") {
	document.write(styles);
} else {
	document.writeln('<style type="text/css" media="screen">');
	document.writeln('@import url("' + cssFile + '");');
	document.writeln('</style>');
}

var byCA = {
	init: function(imagePath) {		
		var text = new String();
		var imgPath = new String();
		
		if(imagePath == null || imagePath == "") {
			imgPath = "http://www.cerebralart.ro/logo_by_cerebral.gif";
		} else {
			imgPath = imagePath;
		}		
		
		text = '<div id="ByCerebralArt">';
		text += '<div id="ByCerebralArtText" style="display:none"><br />by<br /><strong>Cerebral Art</strong><br />out of ordinary</div>';
		text += '<div style="float:right; width:52px"><a target="_blank" href="http://www.cerebralart.ro/" onmouseover="byCA.showByCerebralart()" onmouseout="byCA.hideByCerebralart()"><img src="' + imgPath + '" alt="Cerebral Art" border="0" style="border: 1px solid #3F2265; width: 50px; hieght: 50px" /></a></div>';
		text += '</div>';
		
		document.writeln(text);
	},
	showByCerebralart: function() {
		if(withEffect == true) {
			new Effect.Appear('ByCerebralArtText', {duration:0.5});
		} else {
			$('ByCerebralArtText').style.display = "block";
		}
	},
	hideByCerebralart: function() {
		if(withEffect == true) {
			new Effect.Fade('ByCerebralArtText', {duration:0.5});
		} else {
			$('ByCerebralArtText').style.display = "none";
		}
	}
}

