﻿<!-- script include -->

$(function() {
    var currentURL = window.location.pathname.split('/').slice(-1)[0].toLowerCase();
    var currentPage = "";


    //-- begin LOAD INC --//
    $('#middle-main-1').load('IncMiddle-index.html');
	$('#middle').load('IncMiddle.html');
	$('#beforebottom-other').load('IncMiddle.html');
	$('.menu').load('incMenu.html');
	$('.menunews').load('incMenuNews2010.html');
	$('.menunews11').load('incNews2011.html');
	$('.menunews12').load('incNews2012.html');

    //-- end LOAD INC --//


});
<!-- end script include -->


<!-- script menu -->
$(document).ready(function(){

	$("ul.subnav").parent().append("<span><\//span>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
	
	$("ul.topnav li a").click(function() { //When trigger is clicked...
		
		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).parent().find("ul.subnav").slideDown('slow').show(); //Drop down the subnav on click

		$(this).parent().hover(function() {
		}, function(){	
			$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() { 
			$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});
	

	$("ul.subnav li a").mouseover(function() { //When trigger is clicked...
	
	//Following events are applied to the subnav itself (moving subnav up and down)
	$(this).parent().find("ul.subnav").slideDown('slow').show(); //Drop down the subnav on click
	
	$(this).parent().hover(function() {
	}, function(){
	$(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
	});
	
	//Following events are applied to the trigger (Hover events for the trigger)
	}).hover(function() {
	$(this).addClass("subhover"); //On hover over, add class "subhover"
	}, function(){ //On Hover Out
	$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});


});
<!-- end script menu -->

		$(document).ready(function(){
			//Examples of how to assign the ColorBox event to elements
			$("a[rel='dipasarkan1']").colorbox();
			$("a[rel='dipasarkan2']").colorbox();
			$("a[rel='contoh']").colorbox({transition:"fade"});
			$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
			$("a[rel='satu']").colorbox({slideshow:true});
			$("a[rel='dua']").colorbox({slideshow:true});
			$("a[rel='tiga']").colorbox({slideshow:true});
			$("a[rel='empat']").colorbox({slideshow:true});
			$("a[rel='lima']").colorbox({slideshow:true});
			$(".example5").colorbox();
			$(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
			$(".example7").colorbox({width:"80%", height:"80%", iframe:true});
			$(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
			$(".example9").colorbox({
				onOpen:function(){ alert('onOpen: colorbox is about to open'); },
				onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
				onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
				onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
				onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
			});
			
			//Example of preserving a JavaScript event for inline calls.
			$("#click").click(function(){ 
				$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
				return false;
			});
		});


$(document).ready(function() {

	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});




$(document).ready(function(){

//Larger thumbnail preview 

$("ul.thumb li").hover(function() {
	$(this).css({'z-index' : '10'});
	$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-70px', 
			marginLeft: '-70px', 
			top: '50px', 
			left: '50px', 
			width: '100px', 
			height: '100px',
			padding: '2px'
		}, 200);
	
	} , function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '50px', 
			height: '50px', 
			padding: '5px'
		}, 400);
});

//Swap Image on Click
	$("ul.thumb li a").click(function() {
		
		var mainImage = $(this).attr("href"); //Find Image Name
		$("#main_view img").attr({ src: mainImage });
		return false;		
	});
 
});



