(function(n){n.bi.dataRetrievers.structure={init:function(){n.bi.ignoreAttr(n.bi._ns+":titleflag"),n.bi.ignoreAttr(n.bi._ns+":parenttitle"),n.bi.ignoreAttr(n.bi._ns+":title"),n.bi.ignoreAttr(n.bi._ns+":index"),n.bi.ignoreAttr(n.bi._ns+":gridindex"),n.bi.ignoreAttr(n.bi._ns+":gridtype"),n.bi.ignoreAttr(n.bi._ns+":type"),n.bi.baseLoadData({title:document.title,initial:0})},getLinkData:function(t,i){var r={},f=t&&n(t).length&&n(t).get(0).tagName,u=f?n(t).attr("href"):"",e;return r.urifull=u,r.uridomain=f&&n(t)[0].hostname?n(t)[0].hostname:"",r.uripath=f&&n(t)[0].pathname?n(t)[0].pathname:"",r.uripath=r.uripath.length&&r.uripath.indexOf("/")!=0?"/"+r.uripath:r.uripath,r.urihash=u&&u.indexOf("#")>=0?u.substring(u.indexOf("#")):"",u.indexOf("#")==0?r.uriquery=window.location.search:(u=r.urihash?u.substring(0,u.indexOf("#")):u,r.uriquery=u&&u.indexOf("?")>=0?u.substring(u.indexOf("?")):""),r.type=f&&n(t).attr(n.bi._ns+":type")?n.trim(n(t).attr(n.bi._ns+":type")):"",r.index=f&&n(t).attr(n.bi._ns+":index")?n.trim(n(t).attr(n.bi._ns+":index")):"",r.linktitle=n.bi.getText(t),r.title=r.linktitle,e=t&&n(t).length&&n(t)[0].nodeName?n(t).get(0).nodeName.toLowerCase():"",e=="area"?r.linktitle=r.title=n(t).attr("alt"):r.title==""&&i&&n(i).get(0).nodeName=="IMG"&&(r.title=n(i).attr("alt")),n.extend(r,this.getData(t)),r},getData:function(t){var i={};return i.parenttitlestructure=this.getTitleStructure(t,null,!0),n.extend(i,this.getIndexGridTypeStructure(t)),i},getIndexGridTypeStructure:function(t){var i={},r=[],u=[],f=[];return n(t).parents(":not(table)").each(function(){if(n(this).attr(n.bi._ns+":gridindex")){var t=n(this).attr(n.bi._ns+":gridtype")?n(this).attr(n.bi._ns+":gridtype"):"";r.push(t+" "+n(this).attr(n.bi._ns+":gridindex"))}n(this).attr(n.bi._ns+":index")&&u.push(n(this).attr(n.bi._ns+":index")),n(this).attr(n.bi._ns+":type")&&f.push(n.trim(n(this).attr(n.bi._ns+":type")))}),i.parenttypestructure=f.reverse().join(";"),i.gridstructure=r.reverse().join(";"),i.parentindexstructure=u.reverse().join(";"),i},getIndexStructure:function(t){var i=[],r=!1;return n(t).parents(":not(table)").filter(function(){return n(this).attr(n.bi._ns+":index")?(i.push(n(this).attr(n.bi._ns+":index")),!0):!1}),i.reverse().join(";")},getGridStructure:function(t){var i=[];return n(t).parents(":not(table)").filter(function(){if(n(this).attr(n.bi._ns+":gridindex")){var t=n(this).attr(n.bi._ns+":gridtype")?n(this).attr(n.bi._ns+":gridtype"):"";return i.push(t+" "+n(this).attr(n.bi._ns+":gridindex")),!0}return!1}),i.reverse().join(";")},getTypeStructure:function(t){var i=[];return n(t).parents(":not(table)").filter(function(){return n(this).attr(n.bi._ns+":type")?(i.push(n.trim(n(this).attr(n.bi._ns+":type"))),!0):!1}),i.reverse().join(";")},getTitleStructure:function(t,i,r){var o=[],s=[],u,f,e="",h,c,l;if(!t||!n(t).length||!n(t).get(0).tagName)return"";for(r||o.push(n.trim(n(t).text())||n.trim(n(t).attr("alt"))),n(t).attr(n.bi._ns+":parenttitle")&&s.push(n(t)),n(t).parents(":not(table)").each(function(){n(this).attr(n.bi._ns+":parenttitle")&&s.push(n(this))}),h=0;h<s.length;h++){c=s[h],e=c.attr(n.bi._ns+":parenttitle"),u=c.siblings(":not(table)").filter(function(){return n(this).attr(n.bi._ns+":titleflag")==e}).first(),u.length==0&&(u=c.parents(":not(table)").filter(function(){return n(this).attr(n.bi._ns+":titleflag")==e}).first());if(u.length!=0){u.attr(n.bi._ns+":title")==e?f=u:(f=u.find("["+n.bi._ns+'\\:title="'+e+'"]').first(),f.length==0&&(f=u.find("*").filter(function(){return n(this).attr(n.bi._ns+":title")==e}).first()));if(f){l=this.getTitleStructure(f,!0),o=o.concat(l);break}}}return i?o:o.reverse().join(";")}}})(jQuery);