
(function($){$.fn.flowSlider=function(args){var options={id:"flowSlider",animationSpeed:400,width:650,height:350};if(args.id!==undefined)
options.id=args.id;var flowSlider={borderContainer:$("<div class='flowWrapper' id='"+options.id+"'></div>"),innerContainer:$("<div class='flowContainer'></div>"),leftNavigation:$("<div class='flowNavigation'></div>"),rightContent:$("<div class='flowContent'></div>"),contentNodes:this,currentIndex:0,inRemove:false,length:this.children().length,removeFullViewImage:function(){var img=$("#"+options.id+" .fullViewJFS");if(img!==undefined){$(img).remove();}},stateChangeHandle:function(){flowSlider.removeFullViewImage();var targetIndex=$(this).attr("id");flowSlider.currentIndex=targetIndex[targetIndex.length-1];flowSlider.updateLocation();},imageClickHandle:function(){if($(this).hasClass("flowJS_Thumbnail")){var img=$("<img src='"+$(this).attr("src")+"' class='fullViewJFS'/>");img.css("position","absolute").css("top","-20px").css("left","-20px").css("width",options.width-50).css("z-index","10");img.hide();$(this).after(img);img.fadeIn(300);img.click(flowSlider.imageClickHandle);}
else{flowSlider.removeFullViewImage();}},writeLayout:function(scope){this.borderContainer.height(options.height);this.borderContainer.width(options.width);this.borderContainer.insertBefore(scope);this.innerContainer.height(options.height-5);this.innerContainer.width(options.width-5);this.borderContainer.append(flowSlider.innerContainer);this.leftNavigation.width(49);var i=0;scope.children().each(function(){flowSlider.leftNavigation.append("<span class='buttonContainer' id='"+options.id+""+i+"'><span class='title'>"+$(this).children(".title").html()+"</span></span>");var titleNode=$(this).children(".title")[0];titleNode.parentNode.removeChild(titleNode);$(this).attr('id',""+options.id+i+"").width(options.width-100).height(options.height-10).addClass("jfSlide");if(i==0){$(this).addClass("selected");flowSlider.leftNavigation.children().addClass("selected");}
i++;});this.innerContainer.append(flowSlider.leftNavigation);this.innerContainer.append(flowSlider.rightContent);this.rightContent.width(options.width-50);this.rightContent.html(scope);},addEventHandles:function(){flowSlider.leftNavigation.children(".buttonContainer").click(this.stateChangeHandle);flowSlider.innerContainer.bind("mousewheel",function(e){e.stopPropagation();var wheelData=e.detail?e.detail:e.wheelDelta;if(wheelData<0&&flowSlider.currentIndex<flowSlider.length-1){flowSlider.currentIndex++;flowSlider.removeFullViewImage();}else if(wheelData>0&&flowSlider.currentIndex>0){flowSlider.currentIndex--;flowSlider.removeFullViewImage();}
flowSlider.updateLocation();});$("#"+options.id+" .flowJS_Thumbnail").click(this.imageClickHandle);},updateLocation:function(){flowSlider.leftNavigation.children().removeClass("selected");$("#"+options.id+" .flowNavigation .buttonContainer:eq("+flowSlider.currentIndex+")").addClass("selected");var topOffset=-flowSlider.currentIndex*(options.height-10);flowSlider.rightContent.stop().animate({top:topOffset},1000,"swing");}};flowSlider.writeLayout(this);flowSlider.addEventHandles();};})(jQuery);var is={ie:navigator.appName=='Microsoft Internet Explorer',java:navigator.javaEnabled(),ns:navigator.appName=='Netscape',ua:navigator.userAgent.toLowerCase(),version:parseFloat(navigator.appVersion.substr(21))||parseFloat(navigator.appVersion),win:navigator.platform=='Win32'}
is.mac=is.ua.indexOf('mac')>=0;if(is.ua.indexOf('opera')>=0){is.ie=is.ns=false;is.opera=true;}
if(is.ua.indexOf('gecko')>=0){is.ie=is.ns=false;is.gecko=true;}
