Mohamed = {}
jQuery(document).ready(function() { 
	Mohamed.Site.Twitter(); 
	Mohamed.Site.Portfolio();
 });

Mohamed.Site ={ 
					Gallery:'', 
					Twitter: function()
					{   
						if($('.twitterContent')){
						jQuery.ajax({ 
							   url: "assets/func/twitter-rss.php",
							   cache: true,
							   success: function(data){ 
									$('.twitterContent').append(data);
									window.setInterval(function() {  
										var x = jQuery('#twit-twit');
										var Tweets = jQuery('#twit-twit li').eq(0); 
										 var z = Tweets.html(); 
										 Tweets.fadeOut('slow').remove();
										 x.append('<li>'+z+'</li>');
										}, 2000);
		
      							}});		
						}else {return false;}
					},
					Portfolio: function()
					{   
						var t = $('.pagination div').find('span:first');
						var d = $('.pagination div').find('span:last-child');
						d.append( $('.portfolio > li').length );
						$('#next').click(function(){   
														var active = $('li.active');
														if(active.next().index() == -1 ){
															return false; 
															}else{ t.empty().append(active.next().index()+1);  }
														active.hide().removeClass('active').next().show().addClass('active');
														$(this).stop(); active = null;
														return false;
													});
						$('#previous').click(function(){ 
												  		 var active = $('li.active'); 
														if(active.prev().index() == -1 ){
															return false;
															}else{ t.empty().append(active.prev().index()+1);  }
														active.hide().removeClass('active').prev().show().addClass('active');
														$(this).stop(); active = null;
														return false;
													});
						 
						
						
					}
}