jQuery( document ).ready( function( $ ) {

	'use strict';
			
	var input = $( '#icon-selection-value' );
	var selected = $( '.icon-link.icon-selected' );
	
	// Add icon link as input value	
	$( '.icon-link' ).click( function() {
		$( '.icon-link.icon-selected' ).removeClass( 'icon-selected' );
		$( this ).addClass( 'icon-selected' );     
		var value = $( this ).attr( 'href' );
		input.val( value );
		return false;
	});
	
	// Remember selected icon link	
	$( '.icon-link' ).each( function() {
		var value = $( this ).attr( 'href' );	
		if( input.val() == value ) {
			$( this ).addClass( 'icon-selected' ); 
		}
	});
	
	
});	