$(document).ready(function() {

(function ($) {

    $.fn.customSelect = function () {
        	
			return $(this).each(function() {
            
			var select = $(this),
				custom,
				itemValue;
         
                select.wrap('<div class="custom-select"></div>');
                custom = select.parent();
                custom.prepend('<div class="selected"></div>');
				                
				select.css({			 
				'opacity' : '0',	 
				'position' : 'relative',
				'z-index' : '100'			 
				});	
						 
		 	itemValue = $('option:selected', select).val();
		 	$('.selected', custom).text(itemValue);			 
							
			select.change(function () {    
          			$('option:selected', this).each(function () {
                		itemValue = $(this).val();
				 		$('.selected', custom).text(itemValue);
        			});
        		});         
             
            }); 
             
        }; 

	$(".custom-select").customSelect();
    

})(jQuery);

}); 



