<?php

/* ----------------------------------------
* load scripts
----------------------------------------- */
function wprs_admin_scripts() {
	wp_enqueue_script('jquery');
	wp_enqueue_script('jquery-ui-slider');
	wp_enqueue_script('media-upload');
	wp_enqueue_script('thickbox');
	wp_enqueue_script('jquery-ui-datepicker');
	wp_enqueue_script('colorpicker');
	wp_enqueue_script('jquery-ui-sortable');

	wp_enqueue_script('wprs-admin-scripts', WPRS_PLUGIN_DIR . 'includes/js/admin-scripts.js');
	wp_enqueue_script('media-uploader', WPRS_PLUGIN_DIR . 'includes/js/media-uploader.js');
	wp_enqueue_script('jscolor', WPRS_PLUGIN_DIR . 'includes/js/jscolor.js');
}

if ( is_admin() && isset($_GET['page']) && ( $_GET['page'] == 'wprs') ){
	add_action('admin_print_scripts', 'wprs_admin_scripts');
}

