<script>
	jQuery(function($) {
		var $ = jQuery;		

		$(document).on("change", '[id^="type"]', function() {
			var $container = $('#shortcode-form');
			var deviceType = $(this).val();

			$('.colorsettings', $container).hide();
			$('.orientationsettings', $container).hide();
			$('option[value=gold]', $container).hide();

			switch(deviceType) {
				case 'iphone6':
				case 'iphone6-plus':
				case 'iphone5s':
					$('.colorsettings', $container).show();
					$('.orientationsettings', $container).show();
					$('option[value=gold]', $container).show();
					break;
				case 'iphone5':
				case 'ipad':
					$('.colorsettings', $container).show();
					$('.orientationsettings', $container).show();										
					break;				
				case 's3':
				case 'nexus7':				
				case 'lumia':
					$('.orientationsettings', $container).show();
					break;
				case 'macbook':					
				case 'imac':					
				case 'surface':
				case 'chrome':
				case 'firefox':
				case 'safari':					
					break;
			}
		});

		var $container = $('#shortcode-form');

		$('.colorsettings', $container).hide();
		$('.orientationsettings', $container).hide();
		$('option[value=gold]', $container).hide();		
		
	});
</script>
