jQuery(document).ready(function() {
	jQuery("a:not(.nofade)").each(function(){
		if (jQuery(this).prop("href")){
			jQuery(this).fadeTo('1',0.65).hover(
				function () {
					jQuery(this).stop().fadeTo('fast',1.0);
  				},
				function () {
					jQuery(this).stop().fadeTo('slow',0.65);
				}
			);
		}
	});
	jQuery("ul.books li a img, .dropshadow").boxShadow({transparentColor:jQuery("body").css("backgroundColor")}); // will not execute if not IE
	
	jQuery("ul.books li a div.boxshadow img").fadeTo('1',0.65).hover(
		function () {
			jQuery(this).closest("a").find('h3:first').stop().animate({color: '#AAAAAA'}, 500);
			jQuery(this).stop().fadeTo('fast',1.0);
  		},
		function () {
			jQuery(this).stop().fadeTo('slow',0.65);
			jQuery(this).closest("a").find('h3:first').stop().animate({color: '#666666'}, 1000);
		}
	);

	jQuery("ul.books li a h3, .textshadow").textShadow();//{ xoffset:1, yoffset:1, radius:2, color: black }); // will not execute if not IE
	
	jQuery('a.back').live('click',function(){
        try{
			parent.history.back();
		} catch(e){
			parent.location.href = '/';
		}
		return false;
    });
	
	jQuery("a[rel^='prettyPhoto']").css('cursor', 'url('+template_dir+'/images/magnify.cur), -moz-zoom-in');			
	var nr = jQuery("a[rel^='prettyPhoto']").filter("a.noresize");
	if (nr.length>0)
		jQuery("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded',show_title:false,allow_resize:false});
	else
		jQuery("a[rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded',show_title:false});
		
		
	jQuery(".nivoSlider_wrapper, .pacer_image_slider_div").addClass("dropshadow");	
});
