/* Image w/ description tooltip v2.0
* Created: April 23rd, 2010. This notice must stay intact for usage 
* Author: Dynamic Drive at http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ for full source code
*/


var ddimgtooltip={

	tiparray:function(){
		var tooltips=[]
		//define each tooltip below: tooltip[inc]=['path_to_image', 'optional desc', optional_CSS_object]
		//For desc parameter, backslash any special characters inside your text such as apotrophes ('). Example: "I\'m the king of the world"
		//For CSS object, follow the syntax: {property1:"cssvalue1", property2:"cssvalue2", etc}

		tooltips[0]=["images/partners/bits.jpg", "Birla Institute of Technology & Science, Pilani is considered one of the top educational institutions of India. A number of active student-run social organizations like Nirmaan and NSS, together with the Center for Entrepreneurial Leadership, have helped the institute stand out as one of the most entrepreneurially active communities in the social sector. BITS Pilani is a co-founder of the National Entrepreneurship Network (NEN), India's largest network of start-ups and the people behind them.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[1]=["images/partners/iiml.jpg", "The Indian Institute of Management Lucknow (also referred to as IIM Lucknow or IIML), was established in 1984, by the Government of India, as a national level school of management science. It was the fourth Indian Institute of Management  to be established in India after IIM Calcutta, IIM Ahmedabad, and IIM Bangalore. It is situated at the outskirts of the city of Lucknow.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[2]=["images/partners/nirmaan.jpg", "Nirmaan Organisation is a Non Govt and Non Profit Organisation committed to work for poverty free, knowledge powered and economically empowered Nation by focusing on providing education and livelihood opportunities for underprivileged people. Nirmaan erstwhile My INDIA was started by a group of BITSians in the month of Feb, 2005, got registered as NGO on July 12, 2007 at Hyderabad. At present, it is operating with around 500 members through 8 chapters in four different states. Nirmaan believes that education and a livelihood opportunity are the basic necessities that any citizen must get fulfilled so that poverty which is a recurring problem doesn't any more harass the society and therefore Nirmaan works to provide such basic necessities of the society.  ", {background:"#f4f5f7", font:"12px Arial"}]
		
		tooltips[4]=["images/partners/rangde.png", "Rang De is a web-based social initiative with a mission to provide cost effective microcredit to low income households in India. Money can be lent in the form of a social investment through Rang De's on line portal Rangde.org. Rang De disburses loans to its borrowers through its field partners (usually NGOs) across India. Since January 2008, Rang De has reached out to over 1500 entrepreneurs across 9 states by lending Rs. 9 million. Rang De's mission is to make microcredit accessible to every low income household by lowering loan interest rates through innovative means.", {background:"#f4f5f7", font:"12px Arial"}]
		
		tooltips[5]=["images/partners/tci.png", "ThinkChange India is a leading source of information on social innovation and social entrepreneurship in India. ThinkChange India's goal is to be the primary source of information on social innovation and social entrepreneurship in India.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[6]=["images/partners/industree.jpg", "A social enterprise based in livelihood which supports rural artisans through market access making contemporary products using traditional craftsmanship, Industree is a business venture focusing on the practical results of the financial, social and environmental aspects. It distributes a wide range of natural fibre home accessories and furniture produced with a broad base of over 5000 woman producers and consistently received the UNESCO seal of excellence.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[7]=["images/partners/drishtee.png", "Drishtee, set up originally as a rural 'Information and Communications Technology' (ICT) network orchestrator, has transcended into a last-mile distribution network that supports a vast number of rural entrepreneurs who provide a variety of products and services to villagers. Drishtee has more than 8,000 entrepreneurs registered in its network, most of them engaged in distribution of FMCG products reaching more than 500,000 people in rural India.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[8]=["images/partners/ecosphere.png", "'The sphere supporting life', Ecosphere Spiti is a remarkable, award winning non-profit organization focuses on conservation and responsible tourism in Spiti. Ecosphere is a social enterprise that works on promoting green energy and creating green livelihoods for local communities from natural & cultural resources and linking them to conservation and development of the region. Its mandate is to address the triple bottomline of conservation, development and economics. We are a collaborative effort of the local community and professionals from diverse backgrounds with a wide spectrum of skills and experience.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[9]=["images/partners/sfc.png", "Source for Change is a rural BPO empowering women with employment opportunities and providing quality products at competitive prices to our global clients. The project was founded by Indicorps Fellows and is an initiative of the Grassroots Development Laboratory through the Piramal Foundation in Bagar, Rajasthan. Source for Change began with a vision to present rural women a platform to become financially empowered and to achieve a greater social standing.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[10]=["images/partners/saath.png", "SAATH pioneered the Integrated Slum Development Programme in 1989, an approach that seeks to turn slums into vibrant neighborhoods. SAATH has created one-stop centres where we are able to link them with our integrated programs in education, job training and placement, medical and legal services, and basic infrastructure. SAATH has a physical presence in over 50 slum areas across Gujarat and Rajasthan. It utilizes market-based strategies to create inclusive societies by empowering India's urban and rural poor.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[11]=["images/partners/zameen.png", "A pioneering farmer-owned marketing company for Fairtrade, organic and pesticide-free cotton, Zameen Organics ethos and objectives center on farmer empowerment.Zameen is also a supply chain management company, seeking out partnerships with likeminded companies to more evenly distribute profits along the value chain so that our farmers get a 'fairer' slice of the pie. It was setup in 2006 by Agriculture and Organic Farming (AOFG) India with an initial group of 300 farmers in the Vidarbha region of Maharashtra, an area renowned for its farmer suicide problem, and the tribal area of Adilabad, Andhra Pradesh.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[12]=["images/partners/enableindia.png", "Catering to the needs of all kinds of disabilities like visually impaired, hearing impaired, physically disabled, mental retardation, mental illness and more across the country, Enable India is a non-profit organisation working tirelessly since its inception towards the economic independence and dignity of persons with disabilities. Founded in 1999 by software engineers, Shanti Raghavan & Dipesh Sutariy, Enable India insights to empower others thus bring a professional approach to social service, drawing from years of experience of the founders in the corporate world.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[13]=["images/partners/ecoexist.png", "Ecoexist has been promoting eco-sensitive products through socially sensitive means since 2006 and was formed to answer a need for eco sensitive products in the Indian markets. Ecoexist has associates in all the major metros and have built alliances with several retail stores and chains providing income to groups such as women prisoners and women living in slums.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[14]=["images/partners/lsh.png", "LifeSpring Hospitals Private Ltd. is an expanding chain of maternity hospitals that provide high quality health care to lower-income women and children in India.Through LifeSpring's model of small hospitals (20-25 beds) and prices significantly below market rates, LifeSpring has achieved financial sustainability and social impact through its market-based approach.  LifeSpring aims to serve as a model for providing high quality maternal and child health services to the poor in India and worldwide.  ", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[15]=["images/partners/samhita.png", "Samhita Social Ventures is an initiative of Nadathur S. Raghvan, founder and former Joint MD of Infosys. Samhita which means 'collective good', aims to create an enabling ecosystem for social organizations, investors, donors, volunteers, service providers and other support organizations. Samhita is building a social marketplace that will be the one-stop portal for all information, interaction and resource mobilization in the development space.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[16]=["images/partners/abhiyan.png", "Abhiyan, the Entrepreneurship club at IIM Lucknow is an initiative by the students to foster the spirit of Entrepreneurship in the IIM Lucknow community. Born in 1999, Abhiyan has developed a good network of valuable mentors around the world, including successful entrepreneurs, venture capitalists, & professionals. It has made a mark of itself in the social sector", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[17]=["images/partners/madd.jpg", "MaDD, the name, sums up the basic idea behind everything we want to do i.e. its endless. The aim includes removing the social differentiation of for-profit and not-for-profit so that the Youth can make social/environmental impact through whatever they do and don't have to compromise one thing for the other aiming towards projects making in the field of education, bridging the technology divide between rural and urban India, agriculture and rural empowerment.", {background:"#f4f5f7", font:"12px Arial"}]
		tooltips[18]=["images/partners/ispl.jpg", "Innoversant Solutions Pvt Ltd is a highly acclaimed boutique, multi-disciplinary business and management consulting firm assisting International and domestic businesses and Economic Development and Investment Attraction Agencies. The firm's consulting services are broadly classified as Business Development, Investment Attraction and Trade Promotion. The firm's consulting expertise has been leveraged extensively by international companies looking to enter India and by growing Indian companies. The firm also has strong relations with social development and entrepreneurial initiatives. The management encourages and supports social entrepreneurs and provides consulting services to such ventures. For more information, please visit: www.innoversant.com  Or write to: info@innoversant.com", {background:"#f4f5f7", font:"12px Arial"}]
		
		return tooltips //do not remove/change this line
	}(),

	tooltipoffsets: [20, -30], //additional x and y offset from mouse cursor for tooltips

	//***** NO NEED TO EDIT BEYOND HERE

	tipprefix: 'imgtip', //tooltip ID prefixes

	createtip:function($, tipid, tipinfo){
		if ($('#'+tipid).length==0){ //if this tooltip doesn't exist yet
			return $('<div id="' + tipid + '" class="ddimgtooltip" />').html(
				'<div style="text-align:center"><img src="' + tipinfo[0] + '" /></div>'
				+ ((tipinfo[1])? '<div style="text-align:left; margin-top:5px">'+tipinfo[1]+'</div>' : '')
				)
			.css(tipinfo[2] || {})
			.appendTo(document.body)
		}
		return null
	},

	positiontooltip:function($, $tooltip, e){
		var x=e.pageX+this.tooltipoffsets[0], y=e.pageY+this.tooltipoffsets[1]
		var tipw=$tooltip.outerWidth(), tiph=$tooltip.outerHeight(), 
		x=(x+tipw>$(document).scrollLeft()+$(window).width())? x-tipw-(ddimgtooltip.tooltipoffsets[0]*2) : x
		y=(y+tiph>$(document).scrollTop()+$(window).height())? $(document).scrollTop()+$(window).height()-tiph-10 : y
		$tooltip.css({left:x, top:y})
	},
	
	showbox:function($, $tooltip, e){
		$tooltip.show()
		this.positiontooltip($, $tooltip, e)
	},

	hidebox:function($, $tooltip){
		$tooltip.hide()
	},


	init:function(targetselector){
		jQuery(document).ready(function($){
			var tiparray=ddimgtooltip.tiparray
			var $targets=$(targetselector)
			if ($targets.length==0)
				return
			var tipids=[]
			$targets.each(function(){
				var $target=$(this)
				$target.attr('rel').match(/\[(\d+)\]/) //match d of attribute rel="imgtip[d]"
				var tipsuffix=parseInt(RegExp.$1) //get d as integer
				var tipid=this._tipid=ddimgtooltip.tipprefix+tipsuffix //construct this tip's ID value and remember it
				var $tooltip=ddimgtooltip.createtip($, tipid, tiparray[tipsuffix])
				$target.mouseenter(function(e){
					var $tooltip=$("#"+this._tipid)
					ddimgtooltip.showbox($, $tooltip, e)
				})
				$target.mouseleave(function(e){
					var $tooltip=$("#"+this._tipid)
					ddimgtooltip.hidebox($, $tooltip)
				})
				$target.mousemove(function(e){
					var $tooltip=$("#"+this._tipid)
					ddimgtooltip.positiontooltip($, $tooltip, e)
				})
				if ($tooltip){ //add mouseenter to this tooltip (only if event hasn't already been added)
					$tooltip.mouseenter(function(){
						ddimgtooltip.hidebox($, $(this))
					})
				}
			})

		}) //end dom ready
	}
}

//ddimgtooltip.init("targetElementSelector")
ddimgtooltip.init("*[rel^=imgtip]")
