<odd>
<div class="contentWrapper"><entity uuid="http://shaagird.com/export/opendd/139/" class="object" subclass="image" published="Sat, 08 Aug 2009 19:34:58 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/139/attr/owner_uuid/" entity_uuid="http://shaagird.com/export/opendd/139/" name="owner_uuid" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[http://shaagird.com/export/opendd/127/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/attr/container_uuid/" entity_uuid="http://shaagird.com/export/opendd/139/" name="container_uuid" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[http://shaagird.com/export/opendd/135/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/attr/title/" entity_uuid="http://shaagird.com/export/opendd/139/" name="title" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[Morvi Hostel]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/attr/description/" entity_uuid="http://shaagird.com/export/opendd/139/" name="description" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[<p>Morvi Hostel</p>]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/volatile/renderedentity/" entity_uuid="http://shaagird.com/export/opendd/139/" name="renderedentity" type="volatile" ><![CDATA[<div class="contentWrapper">
	<div id="tidypics_wrapper">

		<div id="tidypics_breadcrumbs">
			<a href="http://shaagird.com/pg/photos/owned/">Your photo albums</a>
>>  <a href="http://shaagird.com/pg/photos/album/135/hostels">Hostels</a>
 <br />
			Views: 90 (0 by you)		</div>

		<div id="tidypics_desc">
			<p>Morvi Hostel</p>
		</div>
		<div id="tidypics_image_nav">
			<ul>
				<li></li>
				<li><a href="http://shaagird.com/pg/photos/view/138">Next &raquo;</a></li>
			</ul>
		</div>
		<div id="tidypics_image_wrapper">
			<a href="http://shaagird.com/action/tidypics/download?file_guid=139&amp;view=inline" title="Morvi Hostel"><img id="tidypics_image"  src="http://shaagird.com/mod/tidypics/thumbnail.php?file_guid=139&amp;size=large" alt="Morvi Hostel" /></a>
			<div class="clearfloat"></div>
		</div>
<div id="tidypics_controls"><ul><li id="download_image"><a href="http://shaagird.com/action/tidypics/download?file_guid=139">Download image</a></li>
</ul></div><div id='tidypics_tag_instructions'>
	<div id='tidypics_tag_instruct_text'>Select area that you want to tag</div>
	<div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'>Stop tagging</button></div>
</div>
<div id="tidypics_tag_menu" class="tidypics_popup">
<form id="quicksearch"  name="tidypics_phototag_form"  action="http://shaagird.com/action/tidypics/addtag" method="POST" >
<input type="hidden"  name="__elgg_token" value="4f0a6d964933c0d5dae82e3cd9917e7a" /> <input type="hidden"  name="__elgg_ts" value="1283681995" /> </ul><input type='submit' value='Tag' class='submit_button' /></form></div>
<div id="tidypics_delete_tag_menu" class="tidypics_popup">
</div><script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.imgareaselect-0.7.js"></script>
<script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.quicksearch.js"></script>
 
<script type="text/javascript">

	var coordinates = "";
	var user_id = 0;
	var tagging = 0;

	// add to DOM as soon as ready
	$(document).ready(function () {
			$('ul#tidypics_phototag_list li').quicksearch({
				position: 'before',
				attached: 'ul#tidypics_phototag_list',
				loaderText: '',
				inputClass: 'input-filter',
				labelText: "<p>Tag this photo</p>",
				delay: 100
			});

			$('#quicksearch').submit( function () { addTag() } );
		}
	);

	// images are loaded so process tags
	$(window).load(function () {
			$('#tidypics_image').setupTags();
		}
	);

	// get tags over image ready for mouseover
	// based on code by Tarique Sani <tarique@sanisoft.com> - MIT and GPL licenses
	$.fn.setupTags = function() 
	{

		image = this;

		imgOffset = $(image).offset();
		imgOffset.left = parseInt(imgOffset.left) + parseInt($(image).css("border-left-width")) + parseInt($(image).css("padding-left"));
		imgOffset.top = parseInt(imgOffset.top) + parseInt($(image).css("border-top-width")) + parseInt($(image).css("padding-top"));
		
		tags = ""; 

		$(tags).each(function(){
			appendTag(imgOffset, this);
		});
		
		$(image).hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		addTagEvents();
		
		$('.tidypics_phototag_links').hover(
			function(){
				code = this.id.substr(7); // cut off taglink to get unique id
				$('#tag'+code).show();
			},
			function(){
				code = this.id.substr(7);
				$('#tag'+code).hide();
			}
		);

		// make sure we catch and handle when the browser is resized
		$(window).resize(function () {
			$('.tidypics_tag').remove();

			imgOffset = $(image).offset();

			$(tags).each(function(){
				appendTag(imgOffset, this);
			});

			addTagEvents();
		});
	} 

	function appendTag(offset, tag)
	{
		// catch for IE when no tags available
		if (tag.id == undefined)
			return;
		
		tag_top   = parseInt(imgOffset.top) + parseInt(tag.y1);
		tag_left  = parseInt(imgOffset.left) + parseInt(tag.x1);

		tag_div = $('<div class="tidypics_tag" id="tag'+tag.id+'"></div>').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' });

		text_top = parseInt(tag_top) + parseInt(tag.height) + 5;

		tag_text_div = $('<div class="tidypics_tag_text">'+tag.text+'</div>').css({ left: tag_left + 'px', top: text_top + 'px', width: '120px'});

		$('body').append(tag_div);
		$('body').append(tag_text_div);
	}

	function addTagEvents() 
	{
		$('.tidypics_tag').hover(
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').show();
				$(this).next('.tidypics_tag_text').css("z-index", 10000);
			},
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').hide();
				$(this).next('.tidypics_tag_text').css("z-index", 0);
			}
		);
	}


	function selectUser(id, name) 
	{
		user_id = id;
		$("input.input-filter").val(name);
	}

	function startTagging() 
	{
		if (tagging != 0)
		{
			stopTagging();
			return;
		}
		
		tagging = 1;
		
		$('#tidypics_tag_control').text("Stop Tagging");
		
		showTagInstruct();
		$('#tidypics_delete_tag_menu').hide();

		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		$('img#tidypics_image').imgAreaSelect( { 
			borderWidth: 2,
			borderColor1: 'white',
			borderColor2: 'white',
			disable: false,
			hide: false,
			onSelectEnd: showTagMenu,
			onSelectStart: hideTagMenu 
			}
		);
	}

	function stopTagging() 
	{
		tagging = 0;
		
		hideTagInstruct();
		hideTagMenu();

		$('#tidypics_tag_control').text("Tag this photo");

		$('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} );

		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}

	function showTagMenu(oObject, oCoordenates)
	{
		offsetX = -100;

		imgOffset = $('#tidypics_image').offset();

		// show the list of friends
		if (oCoordenates.width != 0 && oCoordenates.height != 0) {
			coordinates = oCoordenates;
			
			_top = imgOffset.top + oCoordenates.y2;
			_left = imgOffset.left + oCoordenates.x2 + offsetX;

			$('#tidypics_tag_menu').show().css({
				"top": _top + "px",
				"left": _left + "px"
			});

			$(".input-filter").focus();
		}
	}


	function hideTagMenu()
	{
		$('#tidypics_tag_menu').hide();
	}

	function showTagInstruct()
	{
		offsetY = -60;
		
		divWidth = $('#tidypics_tag_instructions').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_tag_instructions').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
	}

	function hideTagInstruct()
	{
		$('#tidypics_tag_instructions').hide();
	}

	function addTag()
	{
		// do I need a catch for no tag?

		$("input#user_id").val(user_id);
		$("input#word").val( $("input.input-filter").val() );

		coord_string  = '"x1":"' + coordinates.x1 + '",';
		coord_string += '"y1":"' + coordinates.y1 + '",';
		coord_string += '"width":"' + coordinates.width + '",';
		coord_string += '"height":"' + coordinates.height + '"';

		$("input#coordinates").val(coord_string);

		//Show loading
		//$("#tag_menu").replaceWith('<div align="center" class="ajax_loader"></div>');
	}

	function deleteTags()
	{
		offsetY = 60;
		
		stopTagging();
		
		divWidth = $('#delete_tag_menu').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_delete_tag_menu').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
		
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
	
	function hideDeleteMenu()
	{
		$('#tidypics_delete_tag_menu').hide();
		
		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
</script>		<div class="tidypics_info">
Image added by <b><a href="http://shaagird.com/pg/profile/faisal">Faisal</a></b>  392 days ago		</div>
	</div> <!-- tidypics wrapper-->

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>
</div>

]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/1/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:35:41 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/2/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 19:35:44 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/3/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 19:35:44 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/6/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 20:42:54 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/12/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:12:24 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/16/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:27:24 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/18/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:38:08 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/21/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:20 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/22/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:22 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/23/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:24 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/931/" entity_uuid="http://shaagird.com/export/opendd/139/" name="filename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/932/" entity_uuid="http://shaagird.com/export/opendd/139/" name="mimetype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/pjpeg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/933/" entity_uuid="http://shaagird.com/export/opendd/139/" name="originalfilename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[MorviHostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/934/" entity_uuid="http://shaagird.com/export/opendd/139/" name="simpletype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/935/" entity_uuid="http://shaagird.com/export/opendd/139/" name="filestore::dir_root" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[/home/content/f/a/i/faisal76/html/data/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/936/" entity_uuid="http://shaagird.com/export/opendd/139/" name="filestore::filestore" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[ElggDiskFilestore]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/937/" entity_uuid="http://shaagird.com/export/opendd/139/" name="thumbnail" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/thumb1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/938/" entity_uuid="http://shaagird.com/export/opendd/139/" name="smallthumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/smallthumb1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/939/" entity_uuid="http://shaagird.com/export/opendd/139/" name="largethumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:59 -0700" ><![CDATA[image/135/largethumb1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/940/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_exif" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:59 -0700" ><![CDATA[a:8:{s:8:"FileName";s:26:"1249785298morvihostel2.jpg";s:12:"FileDateTime";i:1249785298;s:8:"FileSize";i:238281;s:8:"FileType";i:2;s:8:"MimeType";s:10:"image/jpeg";s:13:"SectionsFound";s:7:"COMMENT";s:8:"COMPUTED";a:4:{s:4:"html";s:24:"width="500" height="375"";s:6:"Height";i:375;s:5:"Width";i:500;s:7:"IsColor";i:1;}s:7:"COMMENT";a:1:{i:0;s:24:"                        ";}}]]></metadata>
<entity uuid="http://shaagird.com/export/opendd/139/" class="object" subclass="image" published="Sat, 08 Aug 2009 19:34:58 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/139/attr/owner_uuid/" entity_uuid="http://shaagird.com/export/opendd/139/" name="owner_uuid" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[http://shaagird.com/export/opendd/127/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/attr/container_uuid/" entity_uuid="http://shaagird.com/export/opendd/139/" name="container_uuid" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[http://shaagird.com/export/opendd/135/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/attr/title/" entity_uuid="http://shaagird.com/export/opendd/139/" name="title" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[Morvi Hostel]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/attr/description/" entity_uuid="http://shaagird.com/export/opendd/139/" name="description" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[<p>Morvi Hostel</p>]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/volatile/renderedentity/" entity_uuid="http://shaagird.com/export/opendd/139/" name="renderedentity" type="volatile" ><![CDATA[<div class="contentWrapper">
	<div id="tidypics_wrapper">

		<div id="tidypics_breadcrumbs">
			<a href="http://shaagird.com/pg/photos/owned/">Your photo albums</a>
>>  <a href="http://shaagird.com/pg/photos/album/135/hostels">Hostels</a>
 <br />
			Views: 91 (0 by you)		</div>

		<div id="tidypics_desc">
			<p>Morvi Hostel</p>
		</div>
		<div id="tidypics_image_nav">
			<ul>
				<li></li>
				<li><a href="http://shaagird.com/pg/photos/view/138">Next &raquo;</a></li>
			</ul>
		</div>
		<div id="tidypics_image_wrapper">
			<a href="http://shaagird.com/action/tidypics/download?file_guid=139&amp;view=inline" title="Morvi Hostel"><img id="tidypics_image"  src="http://shaagird.com/mod/tidypics/thumbnail.php?file_guid=139&amp;size=large" alt="Morvi Hostel" /></a>
			<div class="clearfloat"></div>
		</div>
<div id="tidypics_controls"><ul><li id="download_image"><a href="http://shaagird.com/action/tidypics/download?file_guid=139">Download image</a></li>
</ul></div><div id='tidypics_tag_instructions'>
	<div id='tidypics_tag_instruct_text'>Select area that you want to tag</div>
	<div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'>Stop tagging</button></div>
</div>
<div id="tidypics_tag_menu" class="tidypics_popup">
<form id="quicksearch"  name="tidypics_phototag_form"  action="http://shaagird.com/action/tidypics/addtag" method="POST" >
<input type="hidden"  name="__elgg_token" value="4f0a6d964933c0d5dae82e3cd9917e7a" /> <input type="hidden"  name="__elgg_ts" value="1283681995" /> </ul><input type='submit' value='Tag' class='submit_button' /></form></div>
<div id="tidypics_delete_tag_menu" class="tidypics_popup">
</div><script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.imgareaselect-0.7.js"></script>
<script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.quicksearch.js"></script>
 
<script type="text/javascript">

	var coordinates = "";
	var user_id = 0;
	var tagging = 0;

	// add to DOM as soon as ready
	$(document).ready(function () {
			$('ul#tidypics_phototag_list li').quicksearch({
				position: 'before',
				attached: 'ul#tidypics_phototag_list',
				loaderText: '',
				inputClass: 'input-filter',
				labelText: "<p>Tag this photo</p>",
				delay: 100
			});

			$('#quicksearch').submit( function () { addTag() } );
		}
	);

	// images are loaded so process tags
	$(window).load(function () {
			$('#tidypics_image').setupTags();
		}
	);

	// get tags over image ready for mouseover
	// based on code by Tarique Sani <tarique@sanisoft.com> - MIT and GPL licenses
	$.fn.setupTags = function() 
	{

		image = this;

		imgOffset = $(image).offset();
		imgOffset.left = parseInt(imgOffset.left) + parseInt($(image).css("border-left-width")) + parseInt($(image).css("padding-left"));
		imgOffset.top = parseInt(imgOffset.top) + parseInt($(image).css("border-top-width")) + parseInt($(image).css("padding-top"));
		
		tags = ""; 

		$(tags).each(function(){
			appendTag(imgOffset, this);
		});
		
		$(image).hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		addTagEvents();
		
		$('.tidypics_phototag_links').hover(
			function(){
				code = this.id.substr(7); // cut off taglink to get unique id
				$('#tag'+code).show();
			},
			function(){
				code = this.id.substr(7);
				$('#tag'+code).hide();
			}
		);

		// make sure we catch and handle when the browser is resized
		$(window).resize(function () {
			$('.tidypics_tag').remove();

			imgOffset = $(image).offset();

			$(tags).each(function(){
				appendTag(imgOffset, this);
			});

			addTagEvents();
		});
	} 

	function appendTag(offset, tag)
	{
		// catch for IE when no tags available
		if (tag.id == undefined)
			return;
		
		tag_top   = parseInt(imgOffset.top) + parseInt(tag.y1);
		tag_left  = parseInt(imgOffset.left) + parseInt(tag.x1);

		tag_div = $('<div class="tidypics_tag" id="tag'+tag.id+'"></div>').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' });

		text_top = parseInt(tag_top) + parseInt(tag.height) + 5;

		tag_text_div = $('<div class="tidypics_tag_text">'+tag.text+'</div>').css({ left: tag_left + 'px', top: text_top + 'px', width: '120px'});

		$('body').append(tag_div);
		$('body').append(tag_text_div);
	}

	function addTagEvents() 
	{
		$('.tidypics_tag').hover(
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').show();
				$(this).next('.tidypics_tag_text').css("z-index", 10000);
			},
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').hide();
				$(this).next('.tidypics_tag_text').css("z-index", 0);
			}
		);
	}


	function selectUser(id, name) 
	{
		user_id = id;
		$("input.input-filter").val(name);
	}

	function startTagging() 
	{
		if (tagging != 0)
		{
			stopTagging();
			return;
		}
		
		tagging = 1;
		
		$('#tidypics_tag_control').text("Stop Tagging");
		
		showTagInstruct();
		$('#tidypics_delete_tag_menu').hide();

		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		$('img#tidypics_image').imgAreaSelect( { 
			borderWidth: 2,
			borderColor1: 'white',
			borderColor2: 'white',
			disable: false,
			hide: false,
			onSelectEnd: showTagMenu,
			onSelectStart: hideTagMenu 
			}
		);
	}

	function stopTagging() 
	{
		tagging = 0;
		
		hideTagInstruct();
		hideTagMenu();

		$('#tidypics_tag_control').text("Tag this photo");

		$('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} );

		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}

	function showTagMenu(oObject, oCoordenates)
	{
		offsetX = -100;

		imgOffset = $('#tidypics_image').offset();

		// show the list of friends
		if (oCoordenates.width != 0 && oCoordenates.height != 0) {
			coordinates = oCoordenates;
			
			_top = imgOffset.top + oCoordenates.y2;
			_left = imgOffset.left + oCoordenates.x2 + offsetX;

			$('#tidypics_tag_menu').show().css({
				"top": _top + "px",
				"left": _left + "px"
			});

			$(".input-filter").focus();
		}
	}


	function hideTagMenu()
	{
		$('#tidypics_tag_menu').hide();
	}

	function showTagInstruct()
	{
		offsetY = -60;
		
		divWidth = $('#tidypics_tag_instructions').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_tag_instructions').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
	}

	function hideTagInstruct()
	{
		$('#tidypics_tag_instructions').hide();
	}

	function addTag()
	{
		// do I need a catch for no tag?

		$("input#user_id").val(user_id);
		$("input#word").val( $("input.input-filter").val() );

		coord_string  = '"x1":"' + coordinates.x1 + '",';
		coord_string += '"y1":"' + coordinates.y1 + '",';
		coord_string += '"width":"' + coordinates.width + '",';
		coord_string += '"height":"' + coordinates.height + '"';

		$("input#coordinates").val(coord_string);

		//Show loading
		//$("#tag_menu").replaceWith('<div align="center" class="ajax_loader"></div>');
	}

	function deleteTags()
	{
		offsetY = 60;
		
		stopTagging();
		
		divWidth = $('#delete_tag_menu').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_delete_tag_menu').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
		
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
	
	function hideDeleteMenu()
	{
		$('#tidypics_delete_tag_menu').hide();
		
		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
</script>		<div class="tidypics_info">
Image added by <b><a href="http://shaagird.com/pg/profile/faisal">Faisal</a></b>  392 days ago		</div>
	</div> <!-- tidypics wrapper-->

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>
</div>

]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/1/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:35:41 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/2/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 19:35:44 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/3/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 19:35:44 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/6/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 20:42:54 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/12/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:12:24 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/16/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:27:24 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/18/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:38:08 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/21/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:20 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/22/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:22 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/annotation/23/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:24 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/931/" entity_uuid="http://shaagird.com/export/opendd/139/" name="filename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/932/" entity_uuid="http://shaagird.com/export/opendd/139/" name="mimetype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/pjpeg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/933/" entity_uuid="http://shaagird.com/export/opendd/139/" name="originalfilename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[MorviHostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/934/" entity_uuid="http://shaagird.com/export/opendd/139/" name="simpletype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/935/" entity_uuid="http://shaagird.com/export/opendd/139/" name="filestore::dir_root" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[/home/content/f/a/i/faisal76/html/data/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/936/" entity_uuid="http://shaagird.com/export/opendd/139/" name="filestore::filestore" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[ElggDiskFilestore]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/937/" entity_uuid="http://shaagird.com/export/opendd/139/" name="thumbnail" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/thumb1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/938/" entity_uuid="http://shaagird.com/export/opendd/139/" name="smallthumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/smallthumb1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/939/" entity_uuid="http://shaagird.com/export/opendd/139/" name="largethumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:59 -0700" ><![CDATA[image/135/largethumb1249785298morvihostel2.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/139/metadata/940/" entity_uuid="http://shaagird.com/export/opendd/139/" name="tp_exif" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:59 -0700" ><![CDATA[a:8:{s:8:"FileName";s:26:"1249785298morvihostel2.jpg";s:12:"FileDateTime";i:1249785298;s:8:"FileSize";i:238281;s:8:"FileType";i:2;s:8:"MimeType";s:10:"image/jpeg";s:13:"SectionsFound";s:7:"COMMENT";s:8:"COMPUTED";a:4:{s:4:"html";s:24:"width="500" height="375"";s:6:"Height";i:375;s:5:"Width";i:500;s:7:"IsColor";i:1;}s:7:"COMMENT";a:1:{i:0;s:24:"                        ";}}]]></metadata>
<entity uuid="http://shaagird.com/export/opendd/138/" class="object" subclass="image" published="Sat, 08 Aug 2009 19:34:57 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/138/attr/owner_uuid/" entity_uuid="http://shaagird.com/export/opendd/138/" name="owner_uuid" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[http://shaagird.com/export/opendd/127/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/attr/container_uuid/" entity_uuid="http://shaagird.com/export/opendd/138/" name="container_uuid" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[http://shaagird.com/export/opendd/135/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/attr/title/" entity_uuid="http://shaagird.com/export/opendd/138/" name="title" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[Morvi Hostel]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/attr/description/" entity_uuid="http://shaagird.com/export/opendd/138/" name="description" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[<p>Morvi Hostel</p>]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/volatile/renderedentity/" entity_uuid="http://shaagird.com/export/opendd/138/" name="renderedentity" type="volatile" ><![CDATA[<div class="contentWrapper">
	<div id="tidypics_wrapper">

		<div id="tidypics_breadcrumbs">
			<a href="http://shaagird.com/pg/photos/owned/">Your photo albums</a>
>>  <a href="http://shaagird.com/pg/photos/album/135/hostels">Hostels</a>
 <br />
			Views: 254 (0 by you)		</div>

		<div id="tidypics_desc">
			<p>Morvi Hostel</p>
		</div>
		<div id="tidypics_image_nav">
			<ul>
				<li><a href="http://shaagird.com/pg/photos/view/139">&laquo; Previous</a></li>
				<li><a href="http://shaagird.com/pg/photos/view/136">Next &raquo;</a></li>
			</ul>
		</div>
		<div id="tidypics_image_wrapper">
			<a href="http://shaagird.com/action/tidypics/download?file_guid=138&amp;view=inline" title="Morvi Hostel"><img id="tidypics_image"  src="http://shaagird.com/mod/tidypics/thumbnail.php?file_guid=138&amp;size=large" alt="Morvi Hostel" /></a>
			<div class="clearfloat"></div>
		</div>
<div id="tidypics_controls"><ul><li id="download_image"><a href="http://shaagird.com/action/tidypics/download?file_guid=138">Download image</a></li>
</ul></div><div id='tidypics_tag_instructions'>
	<div id='tidypics_tag_instruct_text'>Select area that you want to tag</div>
	<div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'>Stop tagging</button></div>
</div>
<div id="tidypics_tag_menu" class="tidypics_popup">
<form id="quicksearch"  name="tidypics_phototag_form"  action="http://shaagird.com/action/tidypics/addtag" method="POST" >
<input type="hidden"  name="__elgg_token" value="4f0a6d964933c0d5dae82e3cd9917e7a" /> <input type="hidden"  name="__elgg_ts" value="1283681995" /> </ul><input type='submit' value='Tag' class='submit_button' /></form></div>
<div id="tidypics_delete_tag_menu" class="tidypics_popup">
</div><script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.imgareaselect-0.7.js"></script>
<script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.quicksearch.js"></script>
 
<script type="text/javascript">

	var coordinates = "";
	var user_id = 0;
	var tagging = 0;

	// add to DOM as soon as ready
	$(document).ready(function () {
			$('ul#tidypics_phototag_list li').quicksearch({
				position: 'before',
				attached: 'ul#tidypics_phototag_list',
				loaderText: '',
				inputClass: 'input-filter',
				labelText: "<p>Tag this photo</p>",
				delay: 100
			});

			$('#quicksearch').submit( function () { addTag() } );
		}
	);

	// images are loaded so process tags
	$(window).load(function () {
			$('#tidypics_image').setupTags();
		}
	);

	// get tags over image ready for mouseover
	// based on code by Tarique Sani <tarique@sanisoft.com> - MIT and GPL licenses
	$.fn.setupTags = function() 
	{

		image = this;

		imgOffset = $(image).offset();
		imgOffset.left = parseInt(imgOffset.left) + parseInt($(image).css("border-left-width")) + parseInt($(image).css("padding-left"));
		imgOffset.top = parseInt(imgOffset.top) + parseInt($(image).css("border-top-width")) + parseInt($(image).css("padding-top"));
		
		tags = ""; 

		$(tags).each(function(){
			appendTag(imgOffset, this);
		});
		
		$(image).hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		addTagEvents();
		
		$('.tidypics_phototag_links').hover(
			function(){
				code = this.id.substr(7); // cut off taglink to get unique id
				$('#tag'+code).show();
			},
			function(){
				code = this.id.substr(7);
				$('#tag'+code).hide();
			}
		);

		// make sure we catch and handle when the browser is resized
		$(window).resize(function () {
			$('.tidypics_tag').remove();

			imgOffset = $(image).offset();

			$(tags).each(function(){
				appendTag(imgOffset, this);
			});

			addTagEvents();
		});
	} 

	function appendTag(offset, tag)
	{
		// catch for IE when no tags available
		if (tag.id == undefined)
			return;
		
		tag_top   = parseInt(imgOffset.top) + parseInt(tag.y1);
		tag_left  = parseInt(imgOffset.left) + parseInt(tag.x1);

		tag_div = $('<div class="tidypics_tag" id="tag'+tag.id+'"></div>').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' });

		text_top = parseInt(tag_top) + parseInt(tag.height) + 5;

		tag_text_div = $('<div class="tidypics_tag_text">'+tag.text+'</div>').css({ left: tag_left + 'px', top: text_top + 'px', width: '120px'});

		$('body').append(tag_div);
		$('body').append(tag_text_div);
	}

	function addTagEvents() 
	{
		$('.tidypics_tag').hover(
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').show();
				$(this).next('.tidypics_tag_text').css("z-index", 10000);
			},
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').hide();
				$(this).next('.tidypics_tag_text').css("z-index", 0);
			}
		);
	}


	function selectUser(id, name) 
	{
		user_id = id;
		$("input.input-filter").val(name);
	}

	function startTagging() 
	{
		if (tagging != 0)
		{
			stopTagging();
			return;
		}
		
		tagging = 1;
		
		$('#tidypics_tag_control').text("Stop Tagging");
		
		showTagInstruct();
		$('#tidypics_delete_tag_menu').hide();

		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		$('img#tidypics_image').imgAreaSelect( { 
			borderWidth: 2,
			borderColor1: 'white',
			borderColor2: 'white',
			disable: false,
			hide: false,
			onSelectEnd: showTagMenu,
			onSelectStart: hideTagMenu 
			}
		);
	}

	function stopTagging() 
	{
		tagging = 0;
		
		hideTagInstruct();
		hideTagMenu();

		$('#tidypics_tag_control').text("Tag this photo");

		$('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} );

		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}

	function showTagMenu(oObject, oCoordenates)
	{
		offsetX = -100;

		imgOffset = $('#tidypics_image').offset();

		// show the list of friends
		if (oCoordenates.width != 0 && oCoordenates.height != 0) {
			coordinates = oCoordenates;
			
			_top = imgOffset.top + oCoordenates.y2;
			_left = imgOffset.left + oCoordenates.x2 + offsetX;

			$('#tidypics_tag_menu').show().css({
				"top": _top + "px",
				"left": _left + "px"
			});

			$(".input-filter").focus();
		}
	}


	function hideTagMenu()
	{
		$('#tidypics_tag_menu').hide();
	}

	function showTagInstruct()
	{
		offsetY = -60;
		
		divWidth = $('#tidypics_tag_instructions').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_tag_instructions').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
	}

	function hideTagInstruct()
	{
		$('#tidypics_tag_instructions').hide();
	}

	function addTag()
	{
		// do I need a catch for no tag?

		$("input#user_id").val(user_id);
		$("input#word").val( $("input.input-filter").val() );

		coord_string  = '"x1":"' + coordinates.x1 + '",';
		coord_string += '"y1":"' + coordinates.y1 + '",';
		coord_string += '"width":"' + coordinates.width + '",';
		coord_string += '"height":"' + coordinates.height + '"';

		$("input#coordinates").val(coord_string);

		//Show loading
		//$("#tag_menu").replaceWith('<div align="center" class="ajax_loader"></div>');
	}

	function deleteTags()
	{
		offsetY = 60;
		
		stopTagging();
		
		divWidth = $('#delete_tag_menu').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_delete_tag_menu').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
		
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
	
	function hideDeleteMenu()
	{
		$('#tidypics_delete_tag_menu').hide();
		
		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
</script>		<div class="tidypics_info">
Image added by <b><a href="http://shaagird.com/pg/profile/faisal">Faisal</a></b>  392 days ago		</div>
	</div> <!-- tidypics wrapper-->

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a> <span class="pagination_more">...</span> <a href="/pg/photos/mostrecent?view=opendd&annoff=175" class="pagination_number">8</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=200" class="pagination_number">9</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=225" class="pagination_number">10</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=250" class="pagination_number">11</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a> <span class="pagination_more">...</span> <a href="/pg/photos/mostrecent?view=opendd&annoff=175" class="pagination_number">8</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=200" class="pagination_number">9</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=225" class="pagination_number">10</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=250" class="pagination_number">11</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>
</div>

]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/4/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:35:48 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/5/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 19:35:50 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/9/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 13:23:44 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/10/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 13:23:49 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/13/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:12:31 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/15/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:26:50 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/19/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:38:22 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/24/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:27 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/25/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:29 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/29/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Tue, 06 Oct 2009 16:19:43 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/921/" entity_uuid="http://shaagird.com/export/opendd/138/" name="filename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image/135/1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/922/" entity_uuid="http://shaagird.com/export/opendd/138/" name="mimetype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image/pjpeg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/923/" entity_uuid="http://shaagird.com/export/opendd/138/" name="originalfilename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[MorviHostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/924/" entity_uuid="http://shaagird.com/export/opendd/138/" name="simpletype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/925/" entity_uuid="http://shaagird.com/export/opendd/138/" name="filestore::dir_root" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[/home/content/f/a/i/faisal76/html/data/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/926/" entity_uuid="http://shaagird.com/export/opendd/138/" name="filestore::filestore" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[ElggDiskFilestore]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/927/" entity_uuid="http://shaagird.com/export/opendd/138/" name="thumbnail" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image/135/thumb1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/928/" entity_uuid="http://shaagird.com/export/opendd/138/" name="smallthumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/smallthumb1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/929/" entity_uuid="http://shaagird.com/export/opendd/138/" name="largethumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/largethumb1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/930/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_exif" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[a:8:{s:8:"FileName";s:25:"1249785297morvihostel.jpg";s:12:"FileDateTime";i:1249785297;s:8:"FileSize";i:247213;s:8:"FileType";i:2;s:8:"MimeType";s:10:"image/jpeg";s:13:"SectionsFound";s:7:"COMMENT";s:8:"COMPUTED";a:4:{s:4:"html";s:24:"width="500" height="375"";s:6:"Height";i:375;s:5:"Width";i:500;s:7:"IsColor";i:1;}s:7:"COMMENT";a:1:{i:0;s:24:"                        ";}}]]></metadata>
<entity uuid="http://shaagird.com/export/opendd/138/" class="object" subclass="image" published="Sat, 08 Aug 2009 19:34:57 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/138/attr/owner_uuid/" entity_uuid="http://shaagird.com/export/opendd/138/" name="owner_uuid" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[http://shaagird.com/export/opendd/127/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/attr/container_uuid/" entity_uuid="http://shaagird.com/export/opendd/138/" name="container_uuid" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[http://shaagird.com/export/opendd/135/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/attr/title/" entity_uuid="http://shaagird.com/export/opendd/138/" name="title" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[Morvi Hostel]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/attr/description/" entity_uuid="http://shaagird.com/export/opendd/138/" name="description" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[<p>Morvi Hostel</p>]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/volatile/renderedentity/" entity_uuid="http://shaagird.com/export/opendd/138/" name="renderedentity" type="volatile" ><![CDATA[<div class="contentWrapper">
	<div id="tidypics_wrapper">

		<div id="tidypics_breadcrumbs">
			<a href="http://shaagird.com/pg/photos/owned/">Your photo albums</a>
>>  <a href="http://shaagird.com/pg/photos/album/135/hostels">Hostels</a>
 <br />
			Views: 255 (0 by you)		</div>

		<div id="tidypics_desc">
			<p>Morvi Hostel</p>
		</div>
		<div id="tidypics_image_nav">
			<ul>
				<li><a href="http://shaagird.com/pg/photos/view/139">&laquo; Previous</a></li>
				<li><a href="http://shaagird.com/pg/photos/view/136">Next &raquo;</a></li>
			</ul>
		</div>
		<div id="tidypics_image_wrapper">
			<a href="http://shaagird.com/action/tidypics/download?file_guid=138&amp;view=inline" title="Morvi Hostel"><img id="tidypics_image"  src="http://shaagird.com/mod/tidypics/thumbnail.php?file_guid=138&amp;size=large" alt="Morvi Hostel" /></a>
			<div class="clearfloat"></div>
		</div>
<div id="tidypics_controls"><ul><li id="download_image"><a href="http://shaagird.com/action/tidypics/download?file_guid=138">Download image</a></li>
</ul></div><div id='tidypics_tag_instructions'>
	<div id='tidypics_tag_instruct_text'>Select area that you want to tag</div>
	<div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'>Stop tagging</button></div>
</div>
<div id="tidypics_tag_menu" class="tidypics_popup">
<form id="quicksearch"  name="tidypics_phototag_form"  action="http://shaagird.com/action/tidypics/addtag" method="POST" >
<input type="hidden"  name="__elgg_token" value="8c940bc93874934af3ba1026ba93ebc8" /> <input type="hidden"  name="__elgg_ts" value="1283681996" /> </ul><input type='submit' value='Tag' class='submit_button' /></form></div>
<div id="tidypics_delete_tag_menu" class="tidypics_popup">
</div><script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.imgareaselect-0.7.js"></script>
<script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.quicksearch.js"></script>
 
<script type="text/javascript">

	var coordinates = "";
	var user_id = 0;
	var tagging = 0;

	// add to DOM as soon as ready
	$(document).ready(function () {
			$('ul#tidypics_phototag_list li').quicksearch({
				position: 'before',
				attached: 'ul#tidypics_phototag_list',
				loaderText: '',
				inputClass: 'input-filter',
				labelText: "<p>Tag this photo</p>",
				delay: 100
			});

			$('#quicksearch').submit( function () { addTag() } );
		}
	);

	// images are loaded so process tags
	$(window).load(function () {
			$('#tidypics_image').setupTags();
		}
	);

	// get tags over image ready for mouseover
	// based on code by Tarique Sani <tarique@sanisoft.com> - MIT and GPL licenses
	$.fn.setupTags = function() 
	{

		image = this;

		imgOffset = $(image).offset();
		imgOffset.left = parseInt(imgOffset.left) + parseInt($(image).css("border-left-width")) + parseInt($(image).css("padding-left"));
		imgOffset.top = parseInt(imgOffset.top) + parseInt($(image).css("border-top-width")) + parseInt($(image).css("padding-top"));
		
		tags = ""; 

		$(tags).each(function(){
			appendTag(imgOffset, this);
		});
		
		$(image).hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		addTagEvents();
		
		$('.tidypics_phototag_links').hover(
			function(){
				code = this.id.substr(7); // cut off taglink to get unique id
				$('#tag'+code).show();
			},
			function(){
				code = this.id.substr(7);
				$('#tag'+code).hide();
			}
		);

		// make sure we catch and handle when the browser is resized
		$(window).resize(function () {
			$('.tidypics_tag').remove();

			imgOffset = $(image).offset();

			$(tags).each(function(){
				appendTag(imgOffset, this);
			});

			addTagEvents();
		});
	} 

	function appendTag(offset, tag)
	{
		// catch for IE when no tags available
		if (tag.id == undefined)
			return;
		
		tag_top   = parseInt(imgOffset.top) + parseInt(tag.y1);
		tag_left  = parseInt(imgOffset.left) + parseInt(tag.x1);

		tag_div = $('<div class="tidypics_tag" id="tag'+tag.id+'"></div>').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' });

		text_top = parseInt(tag_top) + parseInt(tag.height) + 5;

		tag_text_div = $('<div class="tidypics_tag_text">'+tag.text+'</div>').css({ left: tag_left + 'px', top: text_top + 'px', width: '120px'});

		$('body').append(tag_div);
		$('body').append(tag_text_div);
	}

	function addTagEvents() 
	{
		$('.tidypics_tag').hover(
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').show();
				$(this).next('.tidypics_tag_text').css("z-index", 10000);
			},
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').hide();
				$(this).next('.tidypics_tag_text').css("z-index", 0);
			}
		);
	}


	function selectUser(id, name) 
	{
		user_id = id;
		$("input.input-filter").val(name);
	}

	function startTagging() 
	{
		if (tagging != 0)
		{
			stopTagging();
			return;
		}
		
		tagging = 1;
		
		$('#tidypics_tag_control').text("Stop Tagging");
		
		showTagInstruct();
		$('#tidypics_delete_tag_menu').hide();

		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		$('img#tidypics_image').imgAreaSelect( { 
			borderWidth: 2,
			borderColor1: 'white',
			borderColor2: 'white',
			disable: false,
			hide: false,
			onSelectEnd: showTagMenu,
			onSelectStart: hideTagMenu 
			}
		);
	}

	function stopTagging() 
	{
		tagging = 0;
		
		hideTagInstruct();
		hideTagMenu();

		$('#tidypics_tag_control').text("Tag this photo");

		$('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} );

		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}

	function showTagMenu(oObject, oCoordenates)
	{
		offsetX = -100;

		imgOffset = $('#tidypics_image').offset();

		// show the list of friends
		if (oCoordenates.width != 0 && oCoordenates.height != 0) {
			coordinates = oCoordenates;
			
			_top = imgOffset.top + oCoordenates.y2;
			_left = imgOffset.left + oCoordenates.x2 + offsetX;

			$('#tidypics_tag_menu').show().css({
				"top": _top + "px",
				"left": _left + "px"
			});

			$(".input-filter").focus();
		}
	}


	function hideTagMenu()
	{
		$('#tidypics_tag_menu').hide();
	}

	function showTagInstruct()
	{
		offsetY = -60;
		
		divWidth = $('#tidypics_tag_instructions').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_tag_instructions').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
	}

	function hideTagInstruct()
	{
		$('#tidypics_tag_instructions').hide();
	}

	function addTag()
	{
		// do I need a catch for no tag?

		$("input#user_id").val(user_id);
		$("input#word").val( $("input.input-filter").val() );

		coord_string  = '"x1":"' + coordinates.x1 + '",';
		coord_string += '"y1":"' + coordinates.y1 + '",';
		coord_string += '"width":"' + coordinates.width + '",';
		coord_string += '"height":"' + coordinates.height + '"';

		$("input#coordinates").val(coord_string);

		//Show loading
		//$("#tag_menu").replaceWith('<div align="center" class="ajax_loader"></div>');
	}

	function deleteTags()
	{
		offsetY = 60;
		
		stopTagging();
		
		divWidth = $('#delete_tag_menu').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_delete_tag_menu').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
		
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
	
	function hideDeleteMenu()
	{
		$('#tidypics_delete_tag_menu').hide();
		
		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
</script>		<div class="tidypics_info">
Image added by <b><a href="http://shaagird.com/pg/profile/faisal">Faisal</a></b>  392 days ago		</div>
	</div> <!-- tidypics wrapper-->

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a> <span class="pagination_more">...</span> <a href="/pg/photos/mostrecent?view=opendd&annoff=175" class="pagination_number">8</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=200" class="pagination_number">9</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=225" class="pagination_number">10</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=250" class="pagination_number">11</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a> <span class="pagination_more">...</span> <a href="/pg/photos/mostrecent?view=opendd&annoff=175" class="pagination_number">8</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=200" class="pagination_number">9</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=225" class="pagination_number">10</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=250" class="pagination_number">11</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>
</div>

]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/4/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:35:48 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/5/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 08 Aug 2009 19:35:50 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/9/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 13:23:44 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/10/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 13:23:49 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/13/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:12:31 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/15/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:26:50 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/19/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:38:22 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/24/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:27 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/25/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:29 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/annotation/29/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Tue, 06 Oct 2009 16:19:43 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/921/" entity_uuid="http://shaagird.com/export/opendd/138/" name="filename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image/135/1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/922/" entity_uuid="http://shaagird.com/export/opendd/138/" name="mimetype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image/pjpeg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/923/" entity_uuid="http://shaagird.com/export/opendd/138/" name="originalfilename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[MorviHostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/924/" entity_uuid="http://shaagird.com/export/opendd/138/" name="simpletype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/925/" entity_uuid="http://shaagird.com/export/opendd/138/" name="filestore::dir_root" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[/home/content/f/a/i/faisal76/html/data/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/926/" entity_uuid="http://shaagird.com/export/opendd/138/" name="filestore::filestore" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[ElggDiskFilestore]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/927/" entity_uuid="http://shaagird.com/export/opendd/138/" name="thumbnail" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:57 -0700" ><![CDATA[image/135/thumb1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/928/" entity_uuid="http://shaagird.com/export/opendd/138/" name="smallthumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/smallthumb1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/929/" entity_uuid="http://shaagird.com/export/opendd/138/" name="largethumb" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[image/135/largethumb1249785297morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/138/metadata/930/" entity_uuid="http://shaagird.com/export/opendd/138/" name="tp_exif" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:34:58 -0700" ><![CDATA[a:8:{s:8:"FileName";s:25:"1249785297morvihostel.jpg";s:12:"FileDateTime";i:1249785297;s:8:"FileSize";i:247213;s:8:"FileType";i:2;s:8:"MimeType";s:10:"image/jpeg";s:13:"SectionsFound";s:7:"COMMENT";s:8:"COMPUTED";a:4:{s:4:"html";s:24:"width="500" height="375"";s:6:"Height";i:375;s:5:"Width";i:500;s:7:"IsColor";i:1;}s:7:"COMMENT";a:1:{i:0;s:24:"                        ";}}]]></metadata>
<entity uuid="http://shaagird.com/export/opendd/136/" class="object" subclass="image" published="Sat, 08 Aug 2009 19:30:28 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/136/attr/owner_uuid/" entity_uuid="http://shaagird.com/export/opendd/136/" name="owner_uuid" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[http://shaagird.com/export/opendd/127/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/attr/container_uuid/" entity_uuid="http://shaagird.com/export/opendd/136/" name="container_uuid" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[http://shaagird.com/export/opendd/135/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/attr/title/" entity_uuid="http://shaagird.com/export/opendd/136/" name="title" published="Sat, 08 Aug 2009 19:30:28 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/136/attr/description/" entity_uuid="http://shaagird.com/export/opendd/136/" name="description" published="Sat, 08 Aug 2009 19:30:28 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/136/volatile/renderedentity/" entity_uuid="http://shaagird.com/export/opendd/136/" name="renderedentity" type="volatile" ><![CDATA[<div class="contentWrapper">
	<div id="tidypics_wrapper">

		<div id="tidypics_breadcrumbs">
			<a href="http://shaagird.com/pg/photos/owned/">Your photo albums</a>
>>  <a href="http://shaagird.com/pg/photos/album/135/hostels">Hostels</a>
 <br />
			Views: 86 (0 by you)		</div>

		<div id="tidypics_desc">
			<br />
		</div>
		<div id="tidypics_image_nav">
			<ul>
				<li><a href="http://shaagird.com/pg/photos/view/138">&laquo; Previous</a></li>
				<li></li>
			</ul>
		</div>
		<div id="tidypics_image_wrapper">
			<a href="http://shaagird.com/action/tidypics/download?file_guid=136&amp;view=inline" title=""><img id="tidypics_image"  src="http://shaagird.com/mod/tidypics/thumbnail.php?file_guid=136&amp;size=large" alt="" /></a>
			<div class="clearfloat"></div>
		</div>
<div id="tidypics_controls"><ul><li id="download_image"><a href="http://shaagird.com/action/tidypics/download?file_guid=136">Download image</a></li>
</ul></div><div id='tidypics_tag_instructions'>
	<div id='tidypics_tag_instruct_text'>Select area that you want to tag</div>
	<div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'>Stop tagging</button></div>
</div>
<div id="tidypics_tag_menu" class="tidypics_popup">
<form id="quicksearch"  name="tidypics_phototag_form"  action="http://shaagird.com/action/tidypics/addtag" method="POST" >
<input type="hidden"  name="__elgg_token" value="8c940bc93874934af3ba1026ba93ebc8" /> <input type="hidden"  name="__elgg_ts" value="1283681996" /> </ul><input type='submit' value='Tag' class='submit_button' /></form></div>
<div id="tidypics_delete_tag_menu" class="tidypics_popup">
</div><script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.imgareaselect-0.7.js"></script>
<script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.quicksearch.js"></script>
 
<script type="text/javascript">

	var coordinates = "";
	var user_id = 0;
	var tagging = 0;

	// add to DOM as soon as ready
	$(document).ready(function () {
			$('ul#tidypics_phototag_list li').quicksearch({
				position: 'before',
				attached: 'ul#tidypics_phototag_list',
				loaderText: '',
				inputClass: 'input-filter',
				labelText: "<p>Tag this photo</p>",
				delay: 100
			});

			$('#quicksearch').submit( function () { addTag() } );
		}
	);

	// images are loaded so process tags
	$(window).load(function () {
			$('#tidypics_image').setupTags();
		}
	);

	// get tags over image ready for mouseover
	// based on code by Tarique Sani <tarique@sanisoft.com> - MIT and GPL licenses
	$.fn.setupTags = function() 
	{

		image = this;

		imgOffset = $(image).offset();
		imgOffset.left = parseInt(imgOffset.left) + parseInt($(image).css("border-left-width")) + parseInt($(image).css("padding-left"));
		imgOffset.top = parseInt(imgOffset.top) + parseInt($(image).css("border-top-width")) + parseInt($(image).css("padding-top"));
		
		tags = ""; 

		$(tags).each(function(){
			appendTag(imgOffset, this);
		});
		
		$(image).hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		addTagEvents();
		
		$('.tidypics_phototag_links').hover(
			function(){
				code = this.id.substr(7); // cut off taglink to get unique id
				$('#tag'+code).show();
			},
			function(){
				code = this.id.substr(7);
				$('#tag'+code).hide();
			}
		);

		// make sure we catch and handle when the browser is resized
		$(window).resize(function () {
			$('.tidypics_tag').remove();

			imgOffset = $(image).offset();

			$(tags).each(function(){
				appendTag(imgOffset, this);
			});

			addTagEvents();
		});
	} 

	function appendTag(offset, tag)
	{
		// catch for IE when no tags available
		if (tag.id == undefined)
			return;
		
		tag_top   = parseInt(imgOffset.top) + parseInt(tag.y1);
		tag_left  = parseInt(imgOffset.left) + parseInt(tag.x1);

		tag_div = $('<div class="tidypics_tag" id="tag'+tag.id+'"></div>').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' });

		text_top = parseInt(tag_top) + parseInt(tag.height) + 5;

		tag_text_div = $('<div class="tidypics_tag_text">'+tag.text+'</div>').css({ left: tag_left + 'px', top: text_top + 'px', width: '120px'});

		$('body').append(tag_div);
		$('body').append(tag_text_div);
	}

	function addTagEvents() 
	{
		$('.tidypics_tag').hover(
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').show();
				$(this).next('.tidypics_tag_text').css("z-index", 10000);
			},
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').hide();
				$(this).next('.tidypics_tag_text').css("z-index", 0);
			}
		);
	}


	function selectUser(id, name) 
	{
		user_id = id;
		$("input.input-filter").val(name);
	}

	function startTagging() 
	{
		if (tagging != 0)
		{
			stopTagging();
			return;
		}
		
		tagging = 1;
		
		$('#tidypics_tag_control').text("Stop Tagging");
		
		showTagInstruct();
		$('#tidypics_delete_tag_menu').hide();

		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		$('img#tidypics_image').imgAreaSelect( { 
			borderWidth: 2,
			borderColor1: 'white',
			borderColor2: 'white',
			disable: false,
			hide: false,
			onSelectEnd: showTagMenu,
			onSelectStart: hideTagMenu 
			}
		);
	}

	function stopTagging() 
	{
		tagging = 0;
		
		hideTagInstruct();
		hideTagMenu();

		$('#tidypics_tag_control').text("Tag this photo");

		$('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} );

		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}

	function showTagMenu(oObject, oCoordenates)
	{
		offsetX = -100;

		imgOffset = $('#tidypics_image').offset();

		// show the list of friends
		if (oCoordenates.width != 0 && oCoordenates.height != 0) {
			coordinates = oCoordenates;
			
			_top = imgOffset.top + oCoordenates.y2;
			_left = imgOffset.left + oCoordenates.x2 + offsetX;

			$('#tidypics_tag_menu').show().css({
				"top": _top + "px",
				"left": _left + "px"
			});

			$(".input-filter").focus();
		}
	}


	function hideTagMenu()
	{
		$('#tidypics_tag_menu').hide();
	}

	function showTagInstruct()
	{
		offsetY = -60;
		
		divWidth = $('#tidypics_tag_instructions').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_tag_instructions').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
	}

	function hideTagInstruct()
	{
		$('#tidypics_tag_instructions').hide();
	}

	function addTag()
	{
		// do I need a catch for no tag?

		$("input#user_id").val(user_id);
		$("input#word").val( $("input.input-filter").val() );

		coord_string  = '"x1":"' + coordinates.x1 + '",';
		coord_string += '"y1":"' + coordinates.y1 + '",';
		coord_string += '"width":"' + coordinates.width + '",';
		coord_string += '"height":"' + coordinates.height + '"';

		$("input#coordinates").val(coord_string);

		//Show loading
		//$("#tag_menu").replaceWith('<div align="center" class="ajax_loader"></div>');
	}

	function deleteTags()
	{
		offsetY = 60;
		
		stopTagging();
		
		divWidth = $('#delete_tag_menu').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_delete_tag_menu').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
		
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
	
	function hideDeleteMenu()
	{
		$('#tidypics_delete_tag_menu').hide();
		
		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
</script>		<div class="tidypics_info">
Image added by <b><a href="http://shaagird.com/pg/profile/faisal">Faisal</a></b>  392 days ago		</div>
	</div> <!-- tidypics wrapper-->

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>
</div>

]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/7/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 07:23:48 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/8/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 07:23:57 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/11/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/2/" published="Mon, 10 Aug 2009 04:54:46 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/14/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:12:38 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/17/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:27:35 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/20/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 05 Sep 2009 20:46:07 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/26/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:30 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/27/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:32 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/28/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:32 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/32/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Thu, 22 Oct 2009 20:30:25 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/915/" entity_uuid="http://shaagird.com/export/opendd/136/" name="filename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[image/135/1249785028morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/916/" entity_uuid="http://shaagird.com/export/opendd/136/" name="mimetype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[image/pjpeg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/917/" entity_uuid="http://shaagird.com/export/opendd/136/" name="originalfilename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[MorviHostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/918/" entity_uuid="http://shaagird.com/export/opendd/136/" name="simpletype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[image]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/919/" entity_uuid="http://shaagird.com/export/opendd/136/" name="filestore::dir_root" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[/home/content/f/a/i/faisal76/html/data/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/920/" entity_uuid="http://shaagird.com/export/opendd/136/" name="filestore::filestore" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[ElggDiskFilestore]]></metadata>
<entity uuid="http://shaagird.com/export/opendd/136/" class="object" subclass="image" published="Sat, 08 Aug 2009 19:30:28 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/136/attr/owner_uuid/" entity_uuid="http://shaagird.com/export/opendd/136/" name="owner_uuid" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[http://shaagird.com/export/opendd/127/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/attr/container_uuid/" entity_uuid="http://shaagird.com/export/opendd/136/" name="container_uuid" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[http://shaagird.com/export/opendd/135/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/attr/title/" entity_uuid="http://shaagird.com/export/opendd/136/" name="title" published="Sat, 08 Aug 2009 19:30:28 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/136/attr/description/" entity_uuid="http://shaagird.com/export/opendd/136/" name="description" published="Sat, 08 Aug 2009 19:30:28 -0700" />
<metadata uuid="http://shaagird.com/export/opendd/136/volatile/renderedentity/" entity_uuid="http://shaagird.com/export/opendd/136/" name="renderedentity" type="volatile" ><![CDATA[<div class="contentWrapper">
	<div id="tidypics_wrapper">

		<div id="tidypics_breadcrumbs">
			<a href="http://shaagird.com/pg/photos/owned/">Your photo albums</a>
>>  <a href="http://shaagird.com/pg/photos/album/135/hostels">Hostels</a>
 <br />
			Views: 87 (0 by you)		</div>

		<div id="tidypics_desc">
			<br />
		</div>
		<div id="tidypics_image_nav">
			<ul>
				<li><a href="http://shaagird.com/pg/photos/view/138">&laquo; Previous</a></li>
				<li></li>
			</ul>
		</div>
		<div id="tidypics_image_wrapper">
			<a href="http://shaagird.com/action/tidypics/download?file_guid=136&amp;view=inline" title=""><img id="tidypics_image"  src="http://shaagird.com/mod/tidypics/thumbnail.php?file_guid=136&amp;size=large" alt="" /></a>
			<div class="clearfloat"></div>
		</div>
<div id="tidypics_controls"><ul><li id="download_image"><a href="http://shaagird.com/action/tidypics/download?file_guid=136">Download image</a></li>
</ul></div><div id='tidypics_tag_instructions'>
	<div id='tidypics_tag_instruct_text'>Select area that you want to tag</div>
	<div id='tidypics_tag_instruct_button_div'><button class='submit_button' id='tidypics_tag_instruct_button' onclick='stopTagging()'>Stop tagging</button></div>
</div>
<div id="tidypics_tag_menu" class="tidypics_popup">
<form id="quicksearch"  name="tidypics_phototag_form"  action="http://shaagird.com/action/tidypics/addtag" method="POST" >
<input type="hidden"  name="__elgg_token" value="8c940bc93874934af3ba1026ba93ebc8" /> <input type="hidden"  name="__elgg_ts" value="1283681996" /> </ul><input type='submit' value='Tag' class='submit_button' /></form></div>
<div id="tidypics_delete_tag_menu" class="tidypics_popup">
</div><script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.imgareaselect-0.7.js"></script>
<script type="text/javascript" src="http://shaagird.com/mod/tidypics/vendors/jquery.quicksearch.js"></script>
 
<script type="text/javascript">

	var coordinates = "";
	var user_id = 0;
	var tagging = 0;

	// add to DOM as soon as ready
	$(document).ready(function () {
			$('ul#tidypics_phototag_list li').quicksearch({
				position: 'before',
				attached: 'ul#tidypics_phototag_list',
				loaderText: '',
				inputClass: 'input-filter',
				labelText: "<p>Tag this photo</p>",
				delay: 100
			});

			$('#quicksearch').submit( function () { addTag() } );
		}
	);

	// images are loaded so process tags
	$(window).load(function () {
			$('#tidypics_image').setupTags();
		}
	);

	// get tags over image ready for mouseover
	// based on code by Tarique Sani <tarique@sanisoft.com> - MIT and GPL licenses
	$.fn.setupTags = function() 
	{

		image = this;

		imgOffset = $(image).offset();
		imgOffset.left = parseInt(imgOffset.left) + parseInt($(image).css("border-left-width")) + parseInt($(image).css("padding-left"));
		imgOffset.top = parseInt(imgOffset.top) + parseInt($(image).css("border-top-width")) + parseInt($(image).css("padding-top"));
		
		tags = ""; 

		$(tags).each(function(){
			appendTag(imgOffset, this);
		});
		
		$(image).hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		addTagEvents();
		
		$('.tidypics_phototag_links').hover(
			function(){
				code = this.id.substr(7); // cut off taglink to get unique id
				$('#tag'+code).show();
			},
			function(){
				code = this.id.substr(7);
				$('#tag'+code).hide();
			}
		);

		// make sure we catch and handle when the browser is resized
		$(window).resize(function () {
			$('.tidypics_tag').remove();

			imgOffset = $(image).offset();

			$(tags).each(function(){
				appendTag(imgOffset, this);
			});

			addTagEvents();
		});
	} 

	function appendTag(offset, tag)
	{
		// catch for IE when no tags available
		if (tag.id == undefined)
			return;
		
		tag_top   = parseInt(imgOffset.top) + parseInt(tag.y1);
		tag_left  = parseInt(imgOffset.left) + parseInt(tag.x1);

		tag_div = $('<div class="tidypics_tag" id="tag'+tag.id+'"></div>').css({ left: tag_left + 'px', top: tag_top + 'px', width: tag.width + 'px', height: tag.height + 'px' });

		text_top = parseInt(tag_top) + parseInt(tag.height) + 5;

		tag_text_div = $('<div class="tidypics_tag_text">'+tag.text+'</div>').css({ left: tag_left + 'px', top: text_top + 'px', width: '120px'});

		$('body').append(tag_div);
		$('body').append(tag_text_div);
	}

	function addTagEvents() 
	{
		$('.tidypics_tag').hover(
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').show();
				$(this).next('.tidypics_tag_text').css("z-index", 10000);
			},
			function(){
				$('.tidypics_tag').show();
				$(this).next('.tidypics_tag_text').hide();
				$(this).next('.tidypics_tag_text').css("z-index", 0);
			}
		);
	}


	function selectUser(id, name) 
	{
		user_id = id;
		$("input.input-filter").val(name);
	}

	function startTagging() 
	{
		if (tagging != 0)
		{
			stopTagging();
			return;
		}
		
		tagging = 1;
		
		$('#tidypics_tag_control').text("Stop Tagging");
		
		showTagInstruct();
		$('#tidypics_delete_tag_menu').hide();

		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);

		$('img#tidypics_image').imgAreaSelect( { 
			borderWidth: 2,
			borderColor1: 'white',
			borderColor2: 'white',
			disable: false,
			hide: false,
			onSelectEnd: showTagMenu,
			onSelectStart: hideTagMenu 
			}
		);
	}

	function stopTagging() 
	{
		tagging = 0;
		
		hideTagInstruct();
		hideTagMenu();

		$('#tidypics_tag_control').text("Tag this photo");

		$('img#tidypics_image').imgAreaSelect( {hide: true, disable: true} );

		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}

	function showTagMenu(oObject, oCoordenates)
	{
		offsetX = -100;

		imgOffset = $('#tidypics_image').offset();

		// show the list of friends
		if (oCoordenates.width != 0 && oCoordenates.height != 0) {
			coordinates = oCoordenates;
			
			_top = imgOffset.top + oCoordenates.y2;
			_left = imgOffset.left + oCoordenates.x2 + offsetX;

			$('#tidypics_tag_menu').show().css({
				"top": _top + "px",
				"left": _left + "px"
			});

			$(".input-filter").focus();
		}
	}


	function hideTagMenu()
	{
		$('#tidypics_tag_menu').hide();
	}

	function showTagInstruct()
	{
		offsetY = -60;
		
		divWidth = $('#tidypics_tag_instructions').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_tag_instructions').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
	}

	function hideTagInstruct()
	{
		$('#tidypics_tag_instructions').hide();
	}

	function addTag()
	{
		// do I need a catch for no tag?

		$("input#user_id").val(user_id);
		$("input#word").val( $("input.input-filter").val() );

		coord_string  = '"x1":"' + coordinates.x1 + '",';
		coord_string += '"y1":"' + coordinates.y1 + '",';
		coord_string += '"width":"' + coordinates.width + '",';
		coord_string += '"height":"' + coordinates.height + '"';

		$("input#coordinates").val(coord_string);

		//Show loading
		//$("#tag_menu").replaceWith('<div align="center" class="ajax_loader"></div>');
	}

	function deleteTags()
	{
		offsetY = 60;
		
		stopTagging();
		
		divWidth = $('#delete_tag_menu').width();
		imgOffset = $('#tidypics_image').offset();
		imgWidth  = $('#tidypics_image').width();
		offsetX   = parseInt((imgWidth - divWidth)/2);
		
		_top = imgOffset.top + offsetY;
		_left = imgOffset.left + offsetX;

		$('#tidypics_delete_tag_menu').show().css({
			"top": _top + "px",
			"left": _left + "px"
		});
		
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').hide();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
	
	function hideDeleteMenu()
	{
		$('#tidypics_delete_tag_menu').hide();
		
		// restart tag hovering
		$('#tidypics_image').hover(
			function(){
				$('.tidypics_tag').show();
			},
			function(){
				$('.tidypics_tag').hide();
			}
		);
	}
</script>		<div class="tidypics_info">
Image added by <b><a href="http://shaagird.com/pg/profile/faisal">Faisal</a></b>  392 days ago		</div>
	</div> <!-- tidypics wrapper-->

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>

<div class="pagination">
<span class="pagination_currentpage"> 1 </span> <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_number">2</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=50" class="pagination_number">3</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=75" class="pagination_number">4</a>  <a href="/pg/photos/mostrecent?view=opendd&annoff=25" class="pagination_next">Next &raquo;</a><div class="clearfloat"></div>
</div>
</div>

]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/7/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 07:23:48 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/8/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 09 Aug 2009 07:23:57 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/11/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/2/" published="Mon, 10 Aug 2009 04:54:46 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/14/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:12:38 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/17/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 16 Aug 2009 11:27:35 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/20/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sat, 05 Sep 2009 20:46:07 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/26/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:30 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/27/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:32 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/28/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Sun, 04 Oct 2009 20:49:32 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/annotation/32/" entity_uuid="http://shaagird.com/export/opendd/136/" name="tp_view" type="annotation" owner_uuid="http://shaagird.com/export/opendd/0/" published="Thu, 22 Oct 2009 20:30:25 -0700" ><![CDATA[1]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/915/" entity_uuid="http://shaagird.com/export/opendd/136/" name="filename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[image/135/1249785028morvihostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/916/" entity_uuid="http://shaagird.com/export/opendd/136/" name="mimetype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[image/pjpeg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/917/" entity_uuid="http://shaagird.com/export/opendd/136/" name="originalfilename" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[MorviHostel.jpg]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/918/" entity_uuid="http://shaagird.com/export/opendd/136/" name="simpletype" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[image]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/919/" entity_uuid="http://shaagird.com/export/opendd/136/" name="filestore::dir_root" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[/home/content/f/a/i/faisal76/html/data/]]></metadata>
<metadata uuid="http://shaagird.com/export/opendd/136/metadata/920/" entity_uuid="http://shaagird.com/export/opendd/136/" name="filestore::filestore" type="metadata" owner_uuid="http://shaagird.com/export/opendd/127/" published="Sat, 08 Aug 2009 19:30:28 -0700" ><![CDATA[ElggDiskFilestore]]></metadata>
</div></odd>