
/*********
 Copyright © 2007 [AT] SBUAS.com
 Author:	Amir Hossein Hossein Pour [AHHP]
 E-Mail:	AHHP@Ymail.com
 Version:	1.0.2
**********/

// Build a menu
var menu7 = [
{'<a>Go Home</a>':{onclick:function(menuItem,menu) { window.location.href="home.html";},icon:'images/menu/home.gif'} },
{'<a>Refresh</a>':{onclick:function(menuItem,menu) {window.history.go(0);},icon:'images/menu/refresh.gif'} },
{'<a href="#top">Go Up</a>':{onclick:function(menuItem,menu) {smoothScroll('top'); return false},icon:'images/menu/top.gif'} },
{'<a href="#down">Go Down</a>':{onclick:function(){smoothScroll('down'); return false},icon:'images/menu/down.gif'} },
{'<a>Print</a>':{onclick:function(menuItem,menu) {window.print();},icon:'images/menu/print.gif'} },
{'<a>Back</a>':{onclick:function(menuItem,menu) {window.history.go(-1);},icon:'images/menu/back.gif'} },
{'<a>Forward</a>':{onclick:function(menuItem,menu) {window.history.go(+1);},icon:'images/menu/forward.gif'} },
{'<a>Contact Us</a>':{onclick:function(menuItem,menu) { window.location.href="mail/index.php";},icon:'images/menu/mail.gif'} },
{'<a>Exit</a>':{onclick:function(menuItem,menu) {window.close();},icon:'images/menu/close.gif'} },
];

// Create a custom show/hide animation
$.fn.myCustomShow = function(speed,callback) { 
	// First position it up and to the left so we can fly in
	var top = parseInt(this.css('top'))-500;
	var left = parseInt(this.css('left'))-500;
	this.css({'top':top,'left':left,opacity:0.0});
	this.show();
	this.animate({'top':'+=500','left':'+=500','opacity':1},speed,null,callback);
};
$.fn.myCustomHide = function(speed,callback) { 
	this.animate({left:'-=500',top:'-=500',opacity:0.0},speed,null,callback); 
};
$(function(){$('.cmenu7-3').contextMenu(menu7,{showTransition:'myCustomShow',hideTransition:'myCustomHide',showSpeed:500,hideSpeed:500,useIframe:false,shadow:false});
});