


var ddimgtooltip={

	tiparray:function(){
		var tooltips=[]
		//BU BOLUM DEGISTIRILMESI GEREKIYOR ISTENIRSE YA DA EKLENMESI VS.
		

		
		tooltips[1]=["0.gif", "Kadinca / 05-11 ", {background:"#000000", width:"140px"}]
		tooltips[2]=["0.gif", "Kadinca / 06-11 ", {background:"#000000", width:"140px"}]
		tooltips[3]=["0.gif", "Kadinca / 07-11 ", {background:"#000000", width:"140px"}]
		tooltips[4]=["0.gif", "MensHealth / 04-11 ", {background:"#000000", width:"140px"}]
		tooltips[5]=["0.gif", "MensHealth / 05-11 ", {background:"#000000", width:"140px"}]
		tooltips[6]=["0.gif", "MensHealth / 07-11", {background:"#000000", width:"140px"}]
		tooltips[7]=["0.gif", "MensHealth / 08-11 ", {background:"#000000", width:"140px"}]
		tooltips[8]=["0.gif", "MensHealth / 09-11 ", {background:"#000000", width:"140px"}]
		tooltips[9]=["0.gif", "Trendsetter Magazine / Fairy Dreams / Spring-11", {background:"#000000", width:"140px"}]
		tooltips[10]=["0.gif", "Trendsetter Magazine / Dali'nizma / Summer-11", {background:"#000000", width:"140px"}]
		tooltips[11]=["0.gif", "Inci Taki ", {background:"#000000", width:"140px"}]
		tooltips[12]=["0.gif", "Niyazi Erdogan / Dolmus", {background:"#000000", width:"140px"}]
		tooltips[13]=["0.gif", "Niyazi Erdogan / Piksel ", {background:"#000000", width:"140px"}]
		tooltips[14]=["0.gif", "Nuts & Peanuts ", {background:"#000000", width:"140px"}]
		tooltips[15]=["0.gif", "Seda Zoroglu / Not Couture ", {background:"#000000", width:"140px"}]
		tooltips[16]=["0.gif", "Sena Ayakkabi", {background:"#000000", width:"140px"}]
		tooltips[17]=["0.gif", "Tabe Kiyamet ", {background:"#000000", width:"140px"}]
			tooltips[18]=["0.gif", "Fiction", {background:"#000000", width:"140px"}]
		tooltips[19]=["0.gif", "Portrait ", {background:"#000000", width:"140px"}]
			tooltips[20]=["0.gif", "Niyazi Erdogan / Dolmus / FASHION ART & BACKSTAGE / 2011  ", {background:"#000000", width:"140px"}]
			tooltips[21]=["0.gif", "Men's Health Magazine  April 2011 Backstage", {background:"#000000", width:"140px"}]
		tooltips[22]=["0.gif", "Nuts & Peanuts Fashion Video Art  ", {background:"#000000", width:"140px"}]
		tooltips[23]=["0.gif", "Tabe Kiyamet Fashion Art & Backstage 2011  ", {background:"#000000", width:"140px"}]
		tooltips[24]=["0.gif", "Trendsetter Magazine Fairy Dreams Fashion Art  ", {background:"#000000", width:"140px"}]
		tooltips[25]=["0.gif", "Touch To İstanbul", {background:"#000000", width:"140px"}]
		tooltips[26]=["0.gif", "Trendsetter Magazine For What Fashion Art  ", {background:"#000000", width:"140px"}]
		tooltips[27]=["0.gif", "Trendsetter Magazine / For What / Autumn-11 ", {background:"#000000", width:"140px"}]
		tooltips[28]=["0.gif", "Trendsetter Magazine For What Fashion Art  ", {background:"#000000", width:"140px"}]
		tooltips[29]=["0.gif", "MensHealth / 11-11  ", {background:"#000000", width:"140px"}]
		tooltips[30]=["0.gif", "Colin's Look Fall / Winter 11  ", {background:"#000000", width:"140px"}]
		tooltips[31]=["0.gif", "Size Magazine 11-11 ", {background:"#000000", width:"140px"}]
		tooltips[32]=["0.gif", "Trendsetter Magazine / Harremsetter/ Winter-11 ", {background:"#000000", width:"140px"}]
		tooltips[33]=["0.gif", "Cigdem Akin / Sihirli Dokunuslar", {background:"#000000", width:"140px"}]
		tooltips[34]=["0.gif", "Sakar Tokur/ Selam", {background:"#000000", width:"140px"}]
           

		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]")
