(function(a){function l(b){var c;if(jQuery(b).is("img")){c=jQuery(b).attr("src")}else{c=a(b).css("backgroundImage");c.match(/^url\(["']?(.*\.png)["']?\)$/i);c=RegExp.$1;}a(b).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='"+c+"')"})}function k(){var b=a.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent);return b}function j(a){var c=a.data.id;jQuery(a.data.element).stop();jQuery(a.data.element).animate({width:b.previewWidth},{duration:b.timeCompressionAnimation,easing:b.easing,queue:false});return false}function i(a){var c=a.data.id;var d=a.data.width;jQuery(a.data.element).stop();jQuery(a.data.element).animate({width:d},{duration:b.timeExpansionAnimation,easing:b.easing,queue:false});return false}function h(){var c=jQuery(d[d.length-1]);if(jQuery(c).width()>b.maxFinalElementLength){if(b.beginingElementsToLeaveOpen>0){b.beginingElementsToLeaveOpen--}if(b.endElementsToLeaveOpen>0){b.endElementsToLeaveOpen--}}if(jQuery(c).width()<b.maxFinalElementLength&&jQuery(c).width()>b.minFinalElementLength){if(b.beginingElementsToLeaveOpen>0){b.beginingElementsToLeaveOpen--}}var e=d.length-1-b.endElementsToLeaveOpen;jQuery(d[d.length-1]).css({background:"none"});a(d).each(function(a,c){if(a>b.beginingElementsToLeaveOpen&&a<e){jQuery(c).find("a").wrap("<span></span>").width(jQuery(c).find("a").width()+10);jQuery(c).append(jQuery('<div class="'+b.overlayClass+'"></div>').css({display:"block"})).css({background:"none"});if(k()){l(jQuery(c).find("."+b.overlayClass).css({width:"20px",right:"-1px"}))}var d={id:a,width:jQuery(c).width(),listElement:jQuery(c).find("span"),isAnimating:false,element:jQuery(c).find("span")};jQuery(c).bind("mouseover",d,i).bind("mouseout",d,j);jQuery(c).find("a").unbind("mouseover",i).unbind("mouseout",j);c.autoInterval=setInterval(function(){clearInterval(c.autoInterval);jQuery(c).find("span").animate({width:b.previewWidth},b.timeInitialCollapse,b.easing)},150*(a-2))}})}function g(){if(typeof jQuery.easing=="object"){f="easeOutQuad"}else{f="swing"}d=jQuery(c).find("li");jQuery(c).find("ul").wrap('<div style="overflow:hidden; position:relative;  width: '+jQuery(c).css("width")+';"><div>');jQuery(c).find("ul").width(5e3);if(d.length>0){jQuery(d[d.length-1]).addClass("last");jQuery(d[0]).addClass("first");if(d.length>b.minimumCompressionElements){h()}}}var b={};var c={};var d={};var e=[];var f;jQuery.fn.jBreadCrumb=function(d){b=a.extend({},a.fn.jBreadCrumb.defaults,d);return this.each(function(){c=a(this);g()})};jQuery.fn.jBreadCrumb.defaults={maxFinalElementLength:400,minFinalElementLength:200,minimumCompressionElements:4,endElementsToLeaveOpen:1,beginingElementsToLeaveOpen:1,timeExpansionAnimation:800,timeCompressionAnimation:500,timeInitialCollapse:600,easing:f,overlayClass:"chevronOverlay",previewWidth:5}})(jQuery)

