var maxjw = jQuery.noConflict();
maxjw(initialize);
function initialize(){
	   
   //lightbox call
   maxjw('.single-product-content-wrapper a').lightBox();
   maxjw('a.lightbox').lightBox();
      maxjw('.blog_post p a').lightBox();

   //lightbox call end 
	
	maxjw('.wp-caption a').hover(function(){
		var wpcaption = maxjw('.wp-caption-text').html()
		maxjw(this).attr("title",wpcaption)
		
		//maxjw('.wp-caption').attr("title",image_caption);
	
	});
	
	maxjw('.raw-category-wrapper').hover(function(){				
		
		maxjw(this).find('.rawimage-description-background').stop(true, true).animate({ opacity:'+=0.4' },200);
		
		 

	},function(){
		
		maxjw(this).find('.rawimage-description-background').stop(true, true).animate({ opacity:'-=0.4' },200);			
	})
	
	
	var initial_height=0;
	var current_height;
	maxjw(".rawimage-description").each(function () {
		
		if ( maxjw(this).height() > initial_height ) {
			initial_height=maxjw(this).height();
			maxjw(".rawimage-description").css('height',initial_height);
			//initial_height=current_height.height();
		}
		
	});
		
	maxjw("#nsletter-form").submit(function () {
		var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
		var newsletter = maxjw('#stext2').val();
		if(newsletter==""){		
		maxjw('.validation-text').remove();		
		maxjw('#sbutton').parent().prepend('<p class="validation-text" style="display:block; position:absolute; color:#D13F80;">Email Address Cannot Be Empty.</p>');
		maxjw('.validation-text').hide().fadeIn(1000);
		return false;			
		}
		if(!newsletter.match(emailExp)){
		maxjw('.validation-text').remove();	
		maxjw('#sbutton').parent().prepend('<p class="validation-text" style="display:block; position:absolute; color:#D13F80;">Invalid Email Address!</p>');
		maxjw('.validation-text').hide().fadeIn(1000);
		return false;		
		}
	})
	

}
