jQuery(document).ready(function($) {

if ($('#main-slider').length) {

	//$('#main-menu-bar').find('a').eq(0).addClass('main-menu-bar-selected'); 
	
	srca = $('#main-menu-bar').find('a').eq(0);
	position = srca.position();
	$("#main-menu-bar-highlight").height(srca.outerHeight());
	$("#main-menu-bar-highlight").width(srca.outerWidth());
	$("#main-menu-bar-highlight").css('left', position.left+3); 


	$('#slider').bxSlider({
			alignment: 'horizontal',        // 'horizontal', 'vertical' - direction in which slides will move
			controls: true,                 // determines if default 'next'/'prev' controls are displayed
			speed: 700,                     // amount of time slide transition lasts (in milliseconds)
			pager: false,                    // determines if a numeric pager is displayed (1 2 3 4...)
			pager_short: false,             // determines if a 'short' numeric pager is displayed (1/4)
			pager_short_separator: ' / ',   // text to be used to separate the short pager
			margin: 0,                      // if 'horizontal', applies a right margin to each slide, if 'vertical' a
											// bottom margin is applied. example: margin: 50
			next_text: '',              // text to be displayed for the 'next' control
			next_image: '',                 // image to be used for the 'next' control
			prev_text: '',              // text to be displayed for the 'prev' control
			prev_image: '',                 // image to be used for the 'prev' control
			auto: true,                    // determines if slides will move automatically
			pause: 5000,                    // time between each slide transition (auto mode only) 
			auto_direction: 'next',         // order in which slides will transition (auto mode only)
			auto_hover: true,               // determines if slideshow will pause while mouse is hovering over slideshow
			auto_controls: false,           // determines if 'start'/'stop' controls are displayed (auto mode only)
			ticker: false,                  // determines if slideshow will behave as a constant ticker
			ticker_controls: false,         // determines if 'start'/'stop' ticker controls are displayed (ticker mode only)
			ticker_direction: 'next',       // order in which slides will transition (ticker mode only)
			ticker_hover: true,             // determines if slideshow will pause while mouse is hovering over slideshow
			stop_text: 'stop',              // text to be displayed for the 'stop' control
			start_text: 'start',            // text to be displayed for the 'start' control
			wrapper_class: 'bxslider'  // class name to be used for the outer wrapper of the slideshow
		});
};
	
$('#slider-mini').bxSlider({
		alignment: 'horizontal',        // 'horizontal', 'vertical' - direction in which slides will move
		controls: false,                 // determines if default 'next'/'prev' controls are displayed
		speed: 700,                     // amount of time slide transition lasts (in milliseconds)
		pager: true,                    // determines if a numeric pager is displayed (1 2 3 4...)
		pager_short: false,             // determines if a 'short' numeric pager is displayed (1/4)
		pager_short_separator: ' / ',   // text to be used to separate the short pager
		margin: 0,                      // if 'horizontal', applies a right margin to each slide, if 'vertical' a
		                                // bottom margin is applied. example: margin: 50
		next_text: '',              // text to be displayed for the 'next' control
		next_image: '',                 // image to be used for the 'next' control
		prev_text: '',              // text to be displayed for the 'prev' control
		prev_image: '',                 // image to be used for the 'prev' control
		auto: false,                    // determines if slides will move automatically
		pause: 5000,                    // time between each slide transition (auto mode only) 
		auto_direction: 'next',         // order in which slides will transition (auto mode only)
		auto_hover: true,               // determines if slideshow will pause while mouse is hovering over slideshow
		auto_controls: false,           // determines if 'start'/'stop' controls are displayed (auto mode only)
		ticker: false,                  // determines if slideshow will behave as a constant ticker
		ticker_controls: false,         // determines if 'start'/'stop' ticker controls are displayed (ticker mode only)
		ticker_direction: 'next',       // order in which slides will transition (ticker mode only)
		ticker_hover: true,             // determines if slideshow will pause while mouse is hovering over slideshow
		stop_text: 'stop',              // text to be displayed for the 'stop' control
		start_text: 'start',            // text to be displayed for the 'start' control
		wrapper_class: 'bxslider-mini'  // class name to be used for the outer wrapper of the slideshow
	});	
	

$('.wpjr-single-page-thumbnails a').click(function(event) {

	event.preventDefault();
	$('.wpjr-single-page-image-box').html('<img src="' + $(this).attr('href') + '">');
});	

	
});
/* 
window.onscroll = function()
{
	
    if( window.XMLHttpRequest ) {
        if (document.documentElement.scrollTop > 25 || self.pageYOffset > 25) {
            ('#header-shopping-cart-box').css('position','fixed');
            $('#header-shopping-cart-box').css('top','0');
        } else if (document.documentElement.scrollTop < 25 || self.pageYOffset < 25) {
            $('#header-shopping-cart-box').css('position','absolute');
            $('#header-shopping-cart-box').css('top','0px');
        }
    }
}
 */
 
 /* 
window.onscroll = function()
{
	
  //  if( window.XMLHttpRequest ) {
        if (document.documentElement.scrollTop > 25 || self.pageYOffset > 25) {
            jQuery('#header-shopping-cart-box').css({'position': 'fixed', 'top': '0px', 'right':'480px', 'z-index':'100'});
        } else if (document.documentElement.scrollTop < 25 || self.pageYOffset < 25) {
            jQuery('#header-shopping-cart-box').css({'position': 'fixed', 'top': '0px', 'right':'480px', 'z-index':'100'});
        }
 //   }
}*/
