/* Author:Kamaal

*/
jQuery(document).ready(function(){
	
	
	
	$( "#accordion" ).accordion({
		collapsible: true,
		animated: 'bounceslide',
		active: 0
	});
	
	var index = $('#slideshow img').size();
	var lis = $('#slideshow img').hide(); 
	var i = 0;
	displayImages(); 
	function displayImages() {  
		
         lis.eq(i++).fadeIn(2500, displayImages);  
      };  
    $('.tel-link').click(function(){
    	return false;
    });
   var cu_Li = $('#main-nav li');
   cu_Li.children('ul').hover(function(){
   		$(this).parent('li').addClass('activeLi')
   },function(){
   		$(this).parent('li').removeClass('activeLi')
   });
   
 
  
  
   
});

 var tree = $('.widget-wrapper .categories > ul');
 $(tree).simpleTreeMenu();
 
 
 $('.simpleTreeMenu .current-cat a').bind('click',function(e){
 	e.preventDefault();
 	$('.children li a').unbind(e);
 	$('.simpleTreeMenu .current-cat-parent a').unbind(e);
 });
 $('.simpleTreeMenu .current-cat-parent a').bind('click',function(e){
 	e.preventDefault();
 	$('.children li a').unbind(e);
 });
 $('.children .current-cat a').bind('click',function(e){
 	e.preventDefault();
 	
 });
 

var site = function() {
	this.navLi = $('#main-nav li').children('ul').hide().end();
	this.init();
};

site.prototype = {
 	
 	init : function() {
 		this.setMenu();
 	},
 	
 	// Enables the slidedown menu, and adds support for IE6
 	
 	setMenu : function() {
 	
 	$.each(this.navLi, function() {
 		if ( $(this).children('ul')[0] ) {
 			$(this)
 				
 					.addClass('hasChildren')
 		}
 	});
 	
 		this.navLi.hover(function() {
 			// mouseover
			$(this).find('> ul').stop(true, true).slideDown('slow', 'easeOutBounce');
 		}, function() {
 			// mouseout
 			$(this).find('> ul').stop(true, true).hide(); 		
		});
 		
 	}
 
}


new site();









