$(document).ready(function(){

$('#slideshow').fadeIn(4000);


var $browser;
	
jQuery.each(jQuery.browser, function(i) {
						  if($.browser.msie){
							 $browser = "ie";
						  }else{
							 $browser = null;
						  }
						});	

//Animation Scripts

$.fn.fadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle'}, speed, easing, callback);

};

$.fn.heightToggle = function(speed,easing,callback){
	return this.animate({height: 'toggle'}, speed, easing, callback);
	};

//Menu
var $itemTitle;
$('#gnav ul li.page_item').hoverIntent(
								 
			function() {
					$(this).addClass('hovered');
					$('a', this).attr('metainfo', $('a', this).attr('title')) // copy title attribute to metainfo attribute 
                    .attr('title', ''); // remove title 															
					$('ul', this).slideToggle(200);	
			},
			function() {
					$(this).removeClass('hovered');
					$('a', this).attr('title', $('a', this).attr('metainfo'));
					$('ul', this).slideToggle(200);
			});

$('small:contains("Copy Protected by ")').remove();


});

$(function() {
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});

function Transpose_Email(userid,domain,subject){
	 
 var email = domain +'@' + userid;
 var TempBefore = '';
 var TempAfter = '';
 var NewString = '';
 var Start = 0;

 var WhereHash = email.indexOf ('@');
 for (Count = 1; Count <= WhereHash; Count ++){
	 TempBefore += email.substring (Start, Count);
	 Start++
	 }
 
		 Start = WhereHash;
		 Start ++
		 WhereHash +=2;
 
 for (Count = WhereHash; Count <=email.length; Count++){
	 TempAfter +=email.substring (Start, Count)
	 Start++
	 }
 NewString = TempAfter +'@' + TempBefore;
 parent.location = 'mailto:'+NewString+'?subject='+subject;
 }