/**
 * @copyright uah-design
 * @author avastor
 * */ 
$(document).ready(function() {
	   $('#miniimage > a').each(function(e){
			var href = $(this).attr('href');
			if (href.search(/\.jpg|\.png/) != -1)
			{
			   $(this).lightBox(); 
			}
		   })
	 $("p.news em").css("cursor","pointer");
	 $("p.news span").css("display","none");
	 
	 
	 $("#imghome").hover(function(){ $(this).attr("src","source/image/home1.jpg") },
                         function(){ $(this).attr("src","source/image/home2.jpg") });

     $("#imgmail").hover(function(){ $(this).attr("src","source/image/mail1.jpg") },
                         function(){ $(this).attr("src","source/image/mail2.jpg") });
  
     /* TOOL TIP By Code Avastor */                    
     $("a").hover(function(kmouse) {         
                 if( $(this).attr("title") ) {
                   $(this).attr("newtitle",$(this).attr("title"));
                   $("#tooltext").html($(this).attr("title"));
                   $(this).removeAttr("title");
                   $("table.popup").show();                    
                 }  
              },function() {
                   if( $(this).attr("newtitle") ) {
                       $("table.popup").hide();
                       $(this).attr("title",$(this).attr("newtitle"));
                       $(this).removeAttr("newtitle"); }    
             })
           .mousemove(function(kmouse){ $("table.popup").css({left:kmouse.pageX-30, top:kmouse.pageY-70}); });
                        
     $("body").append("<table class=\"popup\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"+
                        "<tr>" +
                           "<td id=\"p11\">&nbsp;</td>" +
                           "<td id=\"p12\">&nbsp;</td>" +
                           "<td id=\"p13\">&nbsp;</td>" +
                        "</tr><tr>" +
                           "<td id=\"p14\">&nbsp;</td>" +
                           "<td id=\"tooltext\">&nbsp;</td>" +
                           "<td id=\"p15\">&nbsp;</td>" +
                        "</tr><tr>" +
                           "<td id=\"p16\">&nbsp;</td>" +
                           "<td id=\"p17\">" +
                           "<img height=\"29\" width=\"30\" src=\"source/image/toltip/bubble-tail2.png\" /></td>" +
                           "<td id=\"p18\">&nbsp;</td>" +
                        "</tr>" +
                        "</table>");                    
     /* End TOOL TIP */     
        
     $("p.news em").click(function(){
    	var ob=$(this).parent();
    	ob.children("span").toggle("250");
     });
     
});

