jQuery(document).ready(function() {
	jQuery(function(){
		jQuery('ul#primary-links').superfish();
	});
	jQuery('.slideshow').lightBox();
	jQuery('.thumb-overlay').lightBox();
	DD_belatedPNG.fix('.png-fix');

	if(jQuery.browser.msie && jQuery.browser.version=="6.0") { 
		jQuery('body').css('overflow', 'hidden');
		jQuery('.overlay-window').css('width', $(window).width());
		jQuery('.overlay-window').css('height', $(document).height());
		jQuery('.close-btn').click(function(){
			jQuery('.overlay-window').hide();
			jQuery('body').css('overflow', '');
			return false;
		});
		jQuery('.overlay-window').show();
		var mt = (jQuery(window).height() - 90) / 2;
		var ml = (jQuery(window).width() - 300) / 2;
		jQuery('.window-box').css('margin-top', mt + 'px');
		jQuery('.window-box').css('margin-left', ml + 'px');
	}
	
	function mycarousel_initCallback(carousel) {
		for(var i = 1; i <= $('#intro li').length; i++) {
			$('.carousel-controls').append('<a href="#" id="c-' + i + '">' + i + '</a>');
		}
		jQuery('.carousel-controls a').bind('click', function() {
				carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
				return false;
		});
	};
	Image1= new Image(960,404);
	Image1.src = baseurl + "/wp-content/themes/gdckupwara/picx/intro/1.png";
	Image2 = new Image(960,404)
	Image2.src = baseurl + "/wp-content/themes/gdckupwara/picx/intro/6.png"
	Image3 = new Image(960,404)
	Image3.src = baseurl + "/wp-content/themes/gdckupwara/picx/intro/2.png"
	Image4 = new Image(960,404)
	Image4.src = baseurl + "/wp-content/themes/gdckupwara/picx/intro/4.png"
	Image5 = new Image(960,404)
	Image5.src = baseurl + "/wp-content/themes/gdckupwara/picx/intro/3.png"
	
	var carPicx = '<li><img src="' + baseurl + '/wp-content/themes/gdckupwara/picx/intro/1.png" /><p>Students performing on a function.</p></li>';
  carPicx += '<li><img src="' + baseurl + '/wp-content/themes/gdckupwara/picx/intro/6.png" /><p>Scenic view of the campus.</p></li>';
  carPicx += '<li><img src="' + baseurl + '/wp-content/themes/gdckupwara/picx/intro/2.png" /><p>NSS volunteers offering drinks.</p></li>';
  carPicx += '<li><img src="' + baseurl + '/wp-content/themes/gdckupwara/picx/intro/4.png" /><p>A view of building hosting science block.</p></li>';
  carPicx += '<li><img src="' + baseurl + '/wp-content/themes/gdckupwara/picx/intro/3.png" /><p>College staff posing for a photograph.</p></li>';
	jQuery('#intro').append(carPicx);
	
	jQuery('#intro').jcarousel({
			scroll: 1,
			initCallback: mycarousel_initCallback,
			// This tells jCarousel NOT to autobuild prev/next buttons
			buttonNextHTML: null,
			buttonPrevHTML: null,
			auto: 6
			//wrap: 'both'
		});
	
	
}); //document.ready