/*
 * jwAnnounce v1.0 - http://jeffrey-way.com/introducing-jwannounce/
 * Simple plugin that creates a bar at the top of your website when you need to inform the user of an important announcement.
 * Last updated : November 2nd, 2009
*/ 

$(document).ready(function(){ 
  if (document.getElementById || document.getElementsByTagName); 
	var enabled = document.getElementById("enableJavascript");
	    enabled.style.display = "none";
	var basiccube = document.getElementById("basiccube");
	    basiccube.style.display = "block"; //margin:2.65em
	var pgContent = document.getElementById("pgContent");
	    pgContent.style.display = "block"; //margin:2.65em
	var pgNavigation = document.getElementById("pgNavigation");
	    pgNavigation.style.display = "block"; //margin:2.65em  
	var amazeingparagraph = document.getElementById("amazeingparagraph");
	    amazeingparagraph.style.display = "none"; //margin:2.65em
	var jellybeanparagraph = document.getElementById("jellybeanparagraph");
	    jellybeanparagraph.style.display = "none"; //margin:2.65em
	var walkonparagraph = document.getElementById("walkonparagraph");
	    walkonparagraph.style.display = "none"; //margin:2.65em    
	
   // var speechbubbles = document.getElementById("speechbubbles");
   //     speechbubbles.style.display = "block"; //margin:2.65em    
});



function loadjscssfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script')
  fileref.setAttribute("type","text/javascript")
  fileref.setAttribute("src", filename)
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link")
  fileref.setAttribute("rel", "stylesheet")
  fileref.setAttribute("type", "text/css")
  fileref.setAttribute("href", filename)
 }
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref)
}

function delete_cookie ( cookie_name )
{
  var cookie_date = new Date ( );  // current date & time
  cookie_date.setTime ( cookie_date.getTime() - 1 );
  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}

(function($) {
	
	$.fn.announce = function(options) {

		var options = $.extend({
			className : 'notice',
			textTop : null,    
			//textBottom : null, 
			siteWidth : null }, options);
	
		return this.each(function() {
			$(this).prepend('<div class="' + options.className + '" />');
			
			var $announceDiv = $('.' + options.className);
			
			$announceDiv
				.append('<div>' + options.text + '</div>')
				.children('div:last')
					.css({
						'width' : options.siteWidth,
						'margin' : 'auto'
					})
				.end()
				 				
				.prepend('<span class="closeThis" title="close"><img src="images/close.png" title="close Announcement" width="18" height="18"></span>') //<img src="images/close.png" title="close">		                                                                                                            
				.children('.closeThis')
					.css({
						'position' : 'absolute',
						'cursor' : 'pointer',
						'display' : 'none'
					})
				.end()
				
				.hover(function() {
					// over
					$(this)
						.children('.closeThis')
						.show()
						.click(function() {
							$announceDiv.slideUp(300, function() {
								$(this).remove();
							});
						})
				}, function() {
					$('.closeThis').hide();
					delete_cookie ( "show_message" ); 					
				});
		}); // end each
	
	}
	
})(jQuery); 

var quote=new Array();
quote[0]="<span>Today's Multimedia Professional is a . . .</span>";
    quote[1]="<span>Cross Platform HTML &amp; DOM Developer</span>";
quote[2]="<span>Cross Platform HTML &amp; DOM Developer</span>";  
 	quote[3]="<span>Cross Platform Web Designer &amp; Web Developer</span>";  
quote[4]="<span>Cross Platform Web Designer &amp; Web Developer</span>"; 
    quote[5]="<span>Cross Platform Javascript Developer</span>";  
quote[6]="<span>Cross Platform Javascript Developer</span>";
	quote[7]="<span>Cross Platform MySQL Database Administrator</span>"; 
quote[8]="<span>Cross Platform MySQL Database Administrator</span>"; 
    quote[9]="<span>Cross Platform Digital Video Production</span>";
quote[10]="<span>Cross Platform Digital Video Production</span>"; 
    quote[11]="<span>Cross Platform ActionScript Developer</span>"; 
quote[12]="<span>Cross Platform ActionScript Developer</span>";
	quote[13]="<span>Today's Multimedia Professional is a . . .</span>"; 
var speed=5000;    /*this is the time in milliseconds adjust to suit*/
var q=1;

function showQuote() {

     document.getElementById("quotes").innerHTML=quote[q];
     q++;
if(q==quote.length) {
     q=0;
  }
}
setInterval('showQuote()',speed);    
