loader.jQuery({
  version  : '1.4.2',
  callback : function ($) {

    // Dropdown menu controls (Superfish)
    $.plugin('superfish', function() {
      $(function(){
        $('ul.sf-menu').superfish({onInit:function(){$(this).show();}, autoArrows: false});
      });
    });
	
	 // Mini-cart updates
	 $.plugin('snippets', function () {
	 	$.snippets('', {
	 		after : function (data) {
	 		var total = data['snippets']['.cartTotalItems'] || 0;
	 		var cost = data['snippets']['.cartTotalCost'] || '0.00';
	 		var currency = data['snippets']['.cartCurrency'] || '$';
			$('.myCartLink').attr('title', total + ' Items @ ' + currency + cost);
			}
	 	});
	 });
	 
	// PNG Fix
	$.plugin('pngfix',function(){
		$(document).ready(function(){ 
			$(document).pngFix(); 
		}); 
	});
	
	//email validate
	 $.plugin('validate',function(){
		$(document).ready(function(){
			$(".newssubscribe").validate({
				rules: {
					first_name: required,
					subscriber_email: {
                	required: true,
                	email: true
					}
				}
			});
		});
	  });

  }
});

// OTHER PLUGINS

//$(document).ready(function() {
//	$("#main").scrollable({ keyboard: 'static', circular: true }).navigator("#main_navi").autoscroll({ autoplay: true });
//});

