/*
Project: bShowcase
Author: Brian DiChiara
Version: 1.2
Usage: Add this js file to your site assign a div as the #showcase,
	then give class .showcase-thumb to whatever you want to click
	set Caption to title attribute of image, split the lines by |
	set large src path to alt attribute of image
*/
var bShowcase={$showcase:'',$image:'',$text:'',options:{speed:300},init:function(selector,opts){if(!selector){selector='#showcase';}
bShowcase._setopts(opts);bShowcase.$showcase=jQuery(selector);bShowcase.$image=jQuery('.the-image',bShowcase.$showcase);bShowcase.$text=jQuery('.the-text',bShowcase.$showcase);bShowcase.bind_thumbs();},bind_thumbs:function(e){var $thumbs=jQuery('.showcase-thumb');$thumbs.click(function(e){var $new_img=jQuery(this).find('img');var $sc_img=bShowcase.$image.find('img');if(!$sc_img.is(':animated')&&$sc_img.attr('src')!=$new_img.attr('alt')){var $preload=jQuery('<img />').attr('src',$new_img.attr('alt'));$sc_img.fadeOut(bShowcase.options.speed,function(e){
	var text=$new_img.attr('title');
	var lines=text.split('|');
	var $link = jQuery('.entry-title a', bShowcase.$showcase);
	$link.html(lines[0]);
	$link.attr('href',lines[1]);
	$sc_img.attr('src',$new_img.attr('alt'));
	$sc_img.parents('a').attr('href', lines[1]);
	jQuery('.click-to',bShowcase.$showcase).attr('href', lines[1]);
	$sc_img.load(function(e){
		$sc_img.fadeIn(bShowcase.options.speed);
	});
});}
return false;});},_setopts:function(opts){if(typeof(opts)=='object'){for(var opt in opts){bShowcase.options[opt]=opts[opt];}}}}
