// JavaScript Document
/* 
	Powered by : Mohammed Smeer ElHalabi
			karawan9@gmail.com
			  www.nour3.com
 */
$(document).ready(function(){
	// Go to Top
	$('#toTop').click(function() {
		$('body,html').animate({scrollTop:0},800);
	});
	
	$(".img_opacity img").mouseover(function(){
		$(this).animate({'opacity':'0.7'},200);
	});
	$(".img_opacity img").mouseout(function(){
		$(this).animate({'opacity':'1'},200);
	});
	
	$("#notes .notes-title").toggle(function(){
		$(this).prev("#notes .nour3_notes").slideDown(200);
	},function(){
		$(this).prev("#notes .nour3_notes").slideUp(200);
	});
	
	$("#Halabi p.PLoginIN").click(function(){
		$(this).fadeOut(200);
		$("#Halabi #LoginForm").delay(300).fadeIn(200);
	});
	
	$("a").css('textDecoration','none');
	
	
	$('a,td').tipsy({ gravity: 'w'});
	$('img,input,p,div').tipsy({ gravity: 'n'});
	
	// Quote
	$("#qoute .quotemessage").hide();
	$("#qoute div.quoteauther").hide();
	$("#qoute .quotetitle").toggle(function(){
		$(this).next("#qoute div.quoteauther").fadeIn(300);
		$(this).next().next(".quotemessage").slideDown(300);
	},function(){
		$(this).next("#qoute div.quoteauther").fadeOut(300);
		$(this).next().next(".quotemessage").slideUp(300);
	});
	
	// Placeholder
	$("input[Placeholder]").each(function(){
		$(this).addClass("focus");
		$(this).val($(this).attr("Placeholder"));			
		$(this).focusin(function(){
		if($(this).val()==$(this).attr("Placeholder")){
		$(this).val('');
		$(this).removeClass("focus");
		}
		}).focusout(function(){
		if($(this).val()==''){
		$(this).val($(this).attr("Placeholder"));
		$(this).addClass("focus");
		}	
		});
	});
	$(".halabi-copy-right").each(function(){
		$(this).attr({
		'title' : 'karawan9@gmail.com',
		'href' : 'mailto:karawan9@gmail.com'
		});
		$(this).html("Design, Css & JQuery by: Mohammed ElHalabi");
	});

});
