jQuery.noConflict();
jQuery(document).ready(function(){
 //alert("test");						  
 //marquee smooth and silky effect for top main header
jQuery(document).bind("contextmenu",function(e){
    return false;
});


jQuery('div.homeBoxMarqueeTop marquee').marquee('pointer').mouseover(function () {
            jQuery(this).trigger('stop');
			}).mouseout(function () {
         jQuery(this).trigger('start');
});

//marquee smooth and silky effect for small sidebar header
jQuery('div.homeBoxMarquee marquee').marquee('pointer').mouseover(function () {
            jQuery(this).trigger('stop');
			}).mouseout(function () {
         jQuery(this).trigger('start');
});

	
	jQuery("#gharimessage").hover(function(e){
	jQuery("#gharibox").css('visibility','visible').fadeIn("slow");
	}, function(){
	jQuery("#gharibox").fadeOut("slow");
	});	
	
	//this code is for showing salaat timings tooltip
	var api = jQuery("#testing").simpletip().simpletip(); // Load the content using the API load() method 
	api.load('zeh_changecity.php?setcity=1 td#tooltipsalaat'); 
	
	
	//On hover slide down

	jQuery(".homeBoxMiqaatMatter").hover(
		//function on mouse over
		function(){
			var div = jQuery(".homeBoxMiqaatMatter").css({'height':'auto'});
			var height1 = div.height();
			if(height1<89){
				height1 = "89";
			}else{
			height1 = height1+10;
			}
			jQuery(".homeBoxMiqaatMatter").css({'height':'89px','background-color':'white'});
			//jQuery("#miqaatanimation").css({'position':'absolute'});
			//jQuery("#first_row").css({'top':'90px;','position':'absolute'});
			jQuery(".homeBoxMiqaatMatter")
				.stop()
				.animate({"height":+height1+"px"},400);
				},
		//function on mouse out
		function(){
			jQuery(".homeBoxMiqaatMatter")
			.css({'overflow':'auto'})
			.stop()
			.animate({"height" : "89px"}, 400);
			}
		);
	//this day that year hover effect

	jQuery(".homeBoxTDTYMatter").hover(
		//function on mouse over
		function(){
			var div = jQuery(".homeBoxTDTYMatter").css({'height':'auto'});
			var height1 = div.height();
			if(height1<85){
				height1 = "85";
			}else{
			height1 = height1+10;
			}
			jQuery(".homeBoxTDTYMatter").css({'height':'85px','background-color':'white'});
			jQuery(".homeBoxTDTYMatter")
				.stop()
				.animate({"height":+height1+"px"},400);
				},
		//function on mouse out
		function(){
			jQuery(".homeBoxTDTYMatter")
			.css({'overflow':'auto'})
			.stop()
			.animate({"height" : "85px"}, 400);
			}
		);

	
	//This code is for the footer ad slideup and slidedown
	
		jQuery('#ftrExpand').hover(function() {	
		jQuery(this).find("img").attr("src","resources/images/ftrExpandNoAni.gif");									
		jQuery(".ftrExpandBoxMatter").css({'display':'block'});
		jQuery(".ftrExpandBoxMain").animate({height:'176px'},{queue:false,duration:500});	//jQuery(this).find(".ftrExpandBoxMatter").addClass("footeradimage").animate({top:'200px'},{queue:false,duration:500});
		}, function() {
		jQuery(this).find("img").attr("src","resources/images/ftrExpand.jpg");									
		jQuery(".ftrExpandBoxMatter").css({'display':'none'});	
		jQuery(".ftrExpandBoxMain").animate({height:'0px'},{queue:false,duration:500});
		//jQuery(".ftrExpandBoxMain").css({'display':'none'});
	});
	
	/*Code for disashool and sadaqah*/
	
	xOffset = 10;
	yOffset = 30;
	
	jQuery("#dishasool_x").hover(function(e){
	var data = jQuery(".dishasool").html();
	//	var imgsrc = jQuery(".homeBoxDisSadImg1 img").attr("src");
	jQuery("body").append("<div id='preview'>"+ data +"</div>");				 
	jQuery("#preview")
		.css("top",(e.pageY - xOffset) + "px")
		.css("left",(e.pageX + yOffset) + "px")
		.fadeIn("fast");						
	
	}, function(){
	//	alert("test2");
		jQuery("#preview").remove();
	});	
	
	jQuery("#dishasool_x").mousemove(function(e){
		jQuery("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});		
	//code end for dishasool //
	
	
	jQuery("#sadaqaah_x").hover(function(e){
		var data = jQuery(".sadaqaah").html();
		jQuery("body").append("<div id='preview'>"+ data +"</div>");								 
		jQuery("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						

	}, function(){
	//	alert("test2");
		jQuery("#preview").remove();
	});	
	
	jQuery("#sadaqaah_x").mousemove(function(e){
		jQuery("#preview")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});		
/*end code for dishasool and sadaqah */
/* code for sms subscription form */
	
	jQuery("#hid1").hover(function(){
	jQuery("#faa1").css({display:'block',background:'none'});
	jQuery(".show_hide1").show();
	jQuery("#faa1").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide1").hide();
	jQuery("#faa1").css({display:'none'});
	jQuery("#faa1").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid2").hover(function(){
	jQuery("#faa2").css({display:'block',background:'none'});
	jQuery(".show_hide2").show();
	jQuery("#faa2").animate({height:'225px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide2").hide();
	jQuery("#faa2").css({display:'none'});
	jQuery("#faa2").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid3").hover(function(){
	jQuery("#faa3").css({display:'block',background:'none'});
	jQuery(".show_hide3").show();
	jQuery("#faa3").animate({height:'250px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide3").hide();
	jQuery("#faa3").css({display:'none'});
	jQuery("#faa3").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid4").hover(function(){
	jQuery("#faa4").css({display:'block',background:'none'});
	jQuery(".show_hide4").show();
	jQuery("#faa4").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery("#faa4").css({display:'none'});
	jQuery(".show_hide4").hide();
	jQuery("#faa4").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid5").hover(function(){
	jQuery("#faa5").css({display:'block',background:'none'});
	jQuery(".show_hide5").show();
	jQuery("#faa5").animate({height:'300px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide5").hide();
	jQuery("#faa5").css({display:'none'});
	jQuery("#faa5").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad1").hover(function(){
	jQuery("#no_ad_data1").css({display:'block'});
	jQuery(".show_hide1").show();
	jQuery("#no_ad_data1").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide1").hide();
	jQuery("#no_ad_data1").css({display:'none'});
	jQuery("#no_ad_data1").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad2").hover(function(){
	jQuery("#no_ad_data2").css({display:'block'});
	jQuery(".show_hide2").show();
	jQuery("#no_ad_data2").animate({height:'225px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide2").hide();
	jQuery("#no_ad_data2").css({display:'none'});
	jQuery("#no_ad_data2").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad3").hover(function(){
	jQuery("#no_ad_data3").css({display:'block'});
	jQuery(".show_hide3").show();
	jQuery("#no_ad_data3").animate({height:'250'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide3").hide();
	jQuery("#no_ad_data3").css({display:'none'});
	jQuery("#no_ad_data3").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad4").hover(function(){
	jQuery("#no_ad_data4").css({display:'block'});
	jQuery(".show_hide4").show();
	jQuery("#no_ad_data4").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide4").hide();
	jQuery("#no_ad_data4").css({display:'none'});
	jQuery("#no_ad_data4").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad5").hover(function(){
	jQuery("#no_ad_data5").css({display:'block'});
	jQuery(".show_hide5").show();
	jQuery("#no_ad_data5").animate({height:'300px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide5").hide();
	jQuery("#no_ad_data5").css({display:'none'});
	jQuery("#no_ad_data5").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid1").hover(function(){
	jQuery("#faa1").css({display:'block',background:'none'});
	jQuery(".show_hide1").show();
	jQuery("#faa1").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide1").hide();
	jQuery("#faa1").css({display:'none'});
	jQuery("#faa1").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid2").hover(function(){
	jQuery("#faa2").css({display:'block',background:'none'});
	jQuery(".show_hide2").show();
	jQuery("#faa2").animate({height:'225px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide2").hide();
	jQuery("#faa2").css({display:'none'});
	jQuery("#faa2").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid3").hover(function(){
	jQuery("#faa3").css({display:'block',background:'none'});
	jQuery(".show_hide3").show();
	jQuery("#faa3").animate({height:'250px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide3").hide();
	jQuery("#faa3").css({display:'none'});
	jQuery("#faa3").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid4").hover(function(){
	jQuery("#faa4").css({display:'block',background:'none'});
	jQuery(".show_hide4").show();
	jQuery("#faa4").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery("#faa4").css({display:'none'});
	jQuery(".show_hide4").hide();
	jQuery("#faa4").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#hid5").hover(function(){
	jQuery("#faa5").css({display:'block',background:'none'});
	jQuery(".show_hide5").show();
	jQuery("#faa5").animate({height:'300px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide5").hide();
	jQuery("#faa5").css({display:'none'});
	jQuery("#faa5").animate({height:'0px'},{queue:false,duration:500});
	});
	
	/* For new footer ads */
	
	jQuery("#no_footer_ad6").hover(function(){
	jQuery("#no_ad_data6").css({display:'block'});
	jQuery(".show_hide6").show();
	jQuery("#no_ad_data6").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide6").hide();
	jQuery("#no_ad_data6").css({display:'none'});
	jQuery("#no_ad_data6").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad7").hover(function(){
	jQuery("#no_ad_data7").css({display:'block'});
	jQuery(".show_hide7").show();
	jQuery("#no_ad_data7").animate({height:'225px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide7").hide();
	jQuery("#no_ad_data7").css({display:'none'});
	jQuery("#no_ad_data7").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad8").hover(function(){
	jQuery("#no_ad_data8").css({display:'block'});
	jQuery(".show_hide8").show();
	jQuery("#no_ad_data8").animate({height:'200'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide8").hide();
	jQuery("#no_ad_data8").css({display:'none'});
	jQuery("#no_ad_data8").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad9").hover(function(){
	jQuery("#no_ad_data9").css({display:'block'});
	jQuery(".show_hide9").show();
	jQuery("#no_ad_data9").animate({height:'300px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide9").hide();
	jQuery("#no_ad_data9").css({display:'none'});
	jQuery("#no_ad_data9").animate({height:'0px'},{queue:false,duration:500});
	});
	
	jQuery("#no_footer_ad10").hover(function(){
	jQuery("#no_ad_data10").css({display:'block'});
	jQuery(".show_hide10").show();
	jQuery("#no_ad_data10").animate({height:'200px'},{queue:false,duration:500});
	},function(){
	jQuery(".show_hide10").hide();
	jQuery("#no_ad_data10").css({display:'none'});
	jQuery("#no_ad_data10").animate({height:'0px'},{queue:false,duration:500});
	});
	
	
	//Select all anchor tag with rel set to tooltip  
     jQuery('a[rel=tooltip]').mouseover(function(e) {  
		
         //Grab the title attribute's value and assign it to a variable  
         var tip = jQuery(this).attr('title');      
           
         //Remove the title attribute's to avoid the native tooltip from the browser  
         jQuery(this).attr('title','');  
           
         //Append the tooltip template and its value  
         jQuery(this).append('<div id="tooltip"><div class="tipBody">' + tip + '</div></div>');       
           
         //Set the X and Y axis of the tooltip  
         jQuery('#tooltip').css('top', e.pageY + 10 );  
         jQuery('#tooltip').css('left', e.pageX + 20 );  
           
         //Show the tooltip with faceIn effect  
         jQuery('#tooltip').fadeIn('500');  
         jQuery('#tooltip').fadeTo('10',0.8);  
           
     }).mousemove(function(e) {  
       
         //Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse  
         jQuery('#tooltip').css('top', e.pageY + 10 );  
         jQuery('#tooltip').css('left', e.pageX + 20 );  
           
     }).mouseout(function() {  
       
         //Put back the title attribute's value  
         jQuery(this).attr('title',jQuery('.tipBody').html());  
       
         //Remove the appended tooltip template  
         jQuery(this).children('div#tooltip').remove();  
           
     });  
	
	
	/* Code for footer slideshow */
	jQuery('.slideshow').each(function(){	
		jQuery(this).cycle({
			fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		});
	});
	
	jQuery('.slideshow_left').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
	
	
});

