(function($){$.fn.jslider=function(options){var defaults={width:'610px',height:'225px',slider_height:'24px',content_height:'180px',block_width:'590px',block_padding:'10px',animation_time:300,animation_type:'linear'};var options=$.extend(defaults,options);return this.each(function(){var t=$(this);var html='';var slider_html='';var content_html='';var content_blocks=t.children('div').size();var content_width=parseInt(options.width)*content_blocks+"px";t.children('div').each(function(){var index=t.children('div').index(this);var title=$(this).children('input').val();var description=$(this).children('div').html();if(index==0){slider_html+='

'+title+'

';slider_html+='';slider_html='
'+slider_html+'
';content_html='
'+content_html+'
';html=slider_html+content_html;t.html(html);t.css('width',options.width);t.css('height',options.height);t.children('div.slider').css('height',options.slider_height);t.children('div.content').css('height',options.content_height);t.children('div.content').css('width',content_width);t.children('div.content').children('div.block').css('width',options.block_width);t.children('div.content').children('div.block').css('padding',options.block_padding);var li=t.children('div.slider').children('ul').children('li');li.click(function(){var slider_index=$(this).parent('ul').children('li').index(this)+1;var slider_heading=$(this).parent('ul').parent('div.slider').parent('div').children('div.content').children('div.block:nth-child('+slider_index+')').children('input').val();var contentslider_width=parseInt(t.width());var content_pos_left=0;if($.browser.msie)content_pos_left=(-contentslider_width+20)*(slider_index-1);else content_pos_left=(-contentslider_width)*(slider_index-1);content_pos_left+="px";$(this).parent('ul').parent('div.slider').children('h2').html(slider_heading);$(this).parent('ul').children('li').removeClass('selected');$(this).parent('ul').parent('div.slider').parent('div').children('div.content').animate({"left":content_pos_left},options.animation_time,options.animation_type,function(){$(this).children('div.block').css('visibility','hidden');$(this).children('div.block:nth-child('+slider_index+')').css('visibility','visible');});$(this).addClass('selected');});return true;});};})(jQuery);