/**
 * jQuery yMenu
 *
 * @url         http://www.mewsoft.com/jquery/yMenu/
 * @author      Dr. Ahmed Amin Elsheshtawy, Ph.D. <sales@mewsoft.com>
 * @version     1.0
 * @date        02.07.2011
 * @Copyright 2011 Mewsoft Corp. http://www.mewsoft.com
 * @Released under the MIT and GPL licenses.
 */
(function($){
$.fn.xyMenu=function(options){
var defaults={
speed: 300,
folderclass: 'ymenu-folder',
folderclasshover: 'ymenu-folder-hover'}
var options=$.extend(defaults,options)
return this.each(function(){
var obj=$(this)
if(obj.length<1)return false
$("ul ul",obj).css({
display: "none"
})
$("ul ul",obj).each(function(){
$(this).css({
visibility: "hidden",
display: "none"
})
})
$("ul ul",obj).each(function(){
var li=$(this).parent()
$(">a",li).addClass(options.folderclass)
$(">a",li).hover(function(){
$(this).removeClass(options.folderclass).addClass(options.folderclasshover)
},
function(){
$(this).removeClass(options.folderclasshover).addClass(options.folderclass)
})
})
$("ul li",obj).hover(function(){
$(this).find('ul:first').css({
visibility: "visible",
display: "none"
}).show(options.speed)
},function(){
$(this).find('ul:first').css({
visibility: "hidden",
display: "none"
})
})
})}
})(jQuery)


