// JavaScript Document

jQuery.fn.delay = function(time, callback){
    // Empty function:
    jQuery.fx.step.delay = function(){};
    // Return meaningless animation, (will be added to queue)
    return this.animate({delay:1}, time, callback);
}




jQuery(document).ready(function(){ 

// Function to get random number upto m
	// http://roshanbh.com.np/2008/09/get-random-number-range-two-numbers-javascript.html
	function randomXToY(minVal,maxVal,floatVal) {
		var randVal = minVal+(Math.random()*(maxVal-minVal));
		return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
	}








	

jQuery("ul#fc_menu_open").toggle();
	
jQuery("li.rightclose").click(function () {
      jQuery("ul#fc_menu_open").toggle("slow");
	  
		 return false;
	  
  	  });

 jQuery("a.fc_a_1").click(function () {
      jQuery("ul#fc_menu_open").toggle("slow");
	  
	   return false;
	  
      });
 // start Main Content function 
 
 
 jQuery("a#homeOpener").click(function () {
      jQuery("ul#fc_menu_open").toggle("slow");
	  
	   return false;
	  
      });
 // start Main Content function
 
 
 var WndHgt = jQuery(window).height();
	
	var NewWinHght = WndHgt - 150 ; 
	
	jQuery("#fc_main_cont").height( NewWinHght );
	
	
	var textWghter = WndHgt - 282 ; 
	
	jQuery("#fc_content_holder").height(textWghter);
 
// Single 5 Layout 

	var WindFc = jQuery(window).width();

	
	var NewdithFc = WindFc - 385 ;
	
	
	
	jQuery("div#fc_bottom_holder ").width( NewdithFc );
	
// Search Layout
	var ContFc = jQuery("#fc_main_cont").width();

	var NewdithFcSl = ContFc - 350 ;
	
	jQuery("div.slideser ").width( NewdithFcSl );
	
	



// Start Category View


	jQuery("#fc_cat_opener2").toggle(
      function () {
        jQuery(this).html(" Close List View X ");
        jQuery(this).css({"right":"43px"});
        jQuery("#fc_content_holder").slideToggle();
        jQuery("div.slideser").animate({"height":"464px", "top":"48px"});
        jQuery("#fc_cat_scroll").animate({"height":"0px","top":"464px"});
        
       	jQuery("div#fc_cat_opened2 ").show().animate({"height":"331px"});
        
      },
      function () {
        jQuery(this).html("Costume List View");
        jQuery(this).css({"right":"40px"});
        jQuery("#fc_content_holder").slideToggle();
         jQuery("div.slideser").animate({"height":"307px", "top":"205px"});
          jQuery("#fc_cat_scroll").animate({ "height":"177px","top":"130px"});
          
          jQuery("div#fc_cat_opened2 ").animate({"height":"0px"}).hide();
        
        
      }
    );


// START OVERLAY 



    // to store it in a variable
    var loc = window.location;
      
	





// START input text

jQuery('input[title]').inputHints();
 
 
	
	
	// DSC Etc Layout
	
	var WindW =  jQuery(window).width();
	var LeftW =  jQuery('div#fc_left_box').width();
	var RightW = jQuery('div#fc_right_box').width();
	
	var VarW = LeftW + RightW;
	
	var newW = ((WindW - VarW) - 50);
	
	if (WindW > 1050 ) {
	

  	
  	//start over 1280 functions
  	
  	jQuery('div#fc_mid_box').show().css({"width" : newW + "px",}); 	
  	

  	
  	
	
  	
  	
	} else {
  	
  	//start under 1280 functions
  	jQuery('div#fc_mid_box').hide();
  	
  	  	
	}
	
	
	

 
 
 });
 
 
 
 // Start Resize 
	
jQuery(window).bind('resize', function () {


// Single 5 Layout 

var WindFc = jQuery(window).width();

var NewdithFc = WindFc - 385 ;

var ContFc = jQuery("#fc_main_cont").width();

	var NewdithFcSl = ContFc - 350 ;

jQuery("div.slideser ").width( NewdithFcSl );

jQuery("div#fc_cat_opened ").width( NewdithFcSl );

jQuery("div#fc_bottom_holder ").width( NewdithFc );

jQuery("div#fc_bg_sildhold").width( NewdithFc );

jQuery("#fc_cat_opened ul ").width( NewdithFcSl );
	jQuery("#fc_cat_opened ul li").width( NewdithFcSl );

jQuery("div#fc_cat_opened2 ").width( NewdithFcSl );
	
	jQuery("#fc_cat_opened2 ul ").width( NewdithFcSl );
	jQuery("#fc_cat_opened2 ul li").width( NewdithFcSl )




 var WndHgt = jQuery(window).height();
	
	var NewWinHght = WndHgt - 150 ; 
	
	jQuery("#fc_main_cont").height( NewWinHght );


	var textWghter = WndHgt - 282 ; 
	
	jQuery("#fc_content_holder").height(textWghter);



// Function to get random number upto m
	// http://roshanbh.com.np/2008/09/get-random-number-range-two-numbers-javascript.html
	function randomXToY(minVal,maxVal,floatVal) {
		var randVal = minVal+(Math.random()*(maxVal-minVal));
		return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
	}




var WindW =  jQuery(window).width();
	var LeftW =  jQuery('div#fc_left_box').width();
	var RightW = jQuery('div#fc_right_box').width();
	
	var VarW = LeftW + RightW;
	
	var newW = ((WindW - VarW) - 50);
	
	if (WindW > 1150 ) {
	

  	
  	//start over 1280 functions
  	
  	jQuery('div#fc_mid_box').show().css({"width" : newW + "px",}); 	
  	
  	//start polariod
  		
	// Function to get random number upto m
	// http://roshanbh.com.np/2008/09/get-random-number-range-two-numbers-javascript.html
	function randomXToY(minVal,maxVal,floatVal) {
		var randVal = minVal+(Math.random()*(maxVal-minVal));
		return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
	}
  	
  	
	} else {
  	
  	//start under 1280 functions
  	jQuery('div#fc_mid_box').hide();
  	
  	  	
	}
});
