$.noConflict();
jQuery(document).ready(function(){
    
   
   // Collapse Effect for use in Nav and Menus 
	//hide the all of the element with class 'additional'
	jQuery(".additional").hide();
	//toggle the componenet with class 'seeall'
	jQuery(".seeall").click(function() { jQuery(this).next(".additional").slideToggle(600); });
  
    //Pager Next and Previous Buttons
    jQuery(".category-view > .toolbar .switch-page").hide();
    jQuery(".toolbar-bottom >.toolbar .switch-page").hide();
    jQuery(".category-view > .toolbar .pages li .i-next img").hide();
    jQuery(".category-view > .toolbar .pages li .i-next").appendTo(jQuery(".category-view > .toolbar .switch-page"));
    jQuery(".category-view > .toolbar .switch-page span.next").prependTo(jQuery(".category-view > .toolbar .switch-page .i-next"));    
    jQuery(".category-view > .toolbar .pages li .i-previous img").hide();
    jQuery(".category-view > .toolbar .pages li .i-previous").prependTo(jQuery(".category-view > .toolbar .switch-page"));
    jQuery(".category-view > .toolbar .switch-page span.prev").appendTo(jQuery(".category-view > .toolbar .switch-page .i-previous")); 
    jQuery(".toolbar-bottom > .toolbar .pages li .i-next img").hide();
    jQuery(".toolbar-bottom > .toolbar .pages li .i-next").appendTo(jQuery(".toolbar-bottom > .toolbar .switch-page"));
    jQuery(".toolbar-bottom > .toolbar .switch-page span.next").prependTo(jQuery(".toolbar-bottom > .toolbar .switch-page .i-next"));
    jQuery(".toolbar-bottom > .toolbar .pages li .i-previous img").hide();
    jQuery(".toolbar-bottom > .toolbar .pages li .i-previous").prependTo(jQuery(".toolbar-bottom > .toolbar .switch-page"));
    jQuery(".toolbar-bottom > .toolbar .switch-page span.prev").appendTo(jQuery(".toolbar-bottom > .toolbar .switch-page .i-previous"));    
    jQuery(".category-view > .toolbar .switch-page a[href]").parent().show();
    jQuery(".toolbar-bottom > .toolbar .switch-page a[href]").parent().show();    
    jQuery(".products-grid .price-box .minimal-price").parent().append("<span class='add-msg'>Bulk Prices Available!</span>");
    jQuery(".products-list .price-box .minimal-price").parent().append("<span class='add-msg'>Bulk Prices Available!</span>");
    jQuery(".products-grid .price-box .regular-price span").prepend("Your Price: ");
    jQuery(".products-list .price-box .regular-price span").prepend("Your Price: ");
    
    //First Word Page Titles
    jQuery('.cms-page-view .page-title h1').each(function(){
        var me = jQuery(this);
        me.html(me.html().replace(/^(\w+)/, '<span>$1</span>'));
    });
     
    //Category Bottom Section
    jQuery("#category-bottom").appendTo(jQuery(".category-view"));
    
    //Category Sub Headers
    jQuery(".category-description h2.subheader").appendTo(jQuery(".page-title"));
    
    //Hide Compare Box when empty
    jQuery(".block-compare .block-content p:contains('You have no items to compare')").parent().parent().hide();
    
    //Search Javascript    
    jQuery(".cms-search .block-layered-nav").appendTo(".cms-search .col-left");
    
    /*jQuery("#nav li").hover(function() {
        jQuery("#nav li .nav-block").hide();
        jQuery("#nav li .nav-block").delay(500).fadeIn(500)
    });
    
    jQuery("#nav li").mouseleave(function() {
        jQuery("#nav li .nav-block.shown-sub").show();
    });*/
    
    
});


