/* ---------------------------------------------------------------- */
/*                          STOCKISTS PAGE                         */
/* ---------------------------------------------------------------- */								
										
 

jQuery(document).ready(function() {
												jQuery('.world a').each(function() {
													jQuery(this).click(function(){
															
															//FIND THE TARGET DIV
															var targetItem = jQuery(this).attr("title");
															//alert("#" + targetItem);
															
															//LOAD THE DIV IN
															jQuery("#" + targetItem).fadeIn(300);
															jQuery('.americas_bg h2')
															  .html(targetItem);															
															//ADD CLASS TO THE CURRET SELECTED COUNTRY
															jQuery(this).addClass("selected_country");
															jQuery('.world a').not(".selected_country").css("opacity", "0.2");

													});
													
													jQuery(".close_this").click(function() {
															jQuery(".asia_bg, .americas_bg").fadeOut("fast");
															jQuery('.world a').css("opacity", "1");
													});
												});
												
	/* ---------------------------------------------------------------- */
/*                          COLLECTIONS PAGE                         */
/* ---------------------------------------------------------------- */	

 jQuery(window).load(function() {
	jQuery('#backstretch').hide();
	jQuery('.wrap_collections, .wrap_collectionssignature').hide();
	//jQuery('#wrapper').hide();
		jQuery('#backstretch').fadeIn(1000);
		jQuery('.wrap_collections, .wrap_collectionssignature, .column').fadeIn(1000);
   	//jQuery("#wrapper").fadeIn(1200);
 });
										
									var open 	= "1"
									var close 	= "0.4" 
										jQuery("#aa").mouseover(function() {
										    //alert("test1");
											jQuery("#aa").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#aa").fadeTo("fast", close);
  										});
										
										jQuery("#bb").mouseover(function() {
										    //alert("test1");
											jQuery("#bb").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#bb").fadeTo("fast", close);
  										});
										
										jQuery("#cc").mouseover(function() {
										    //alert("test1");
											jQuery("#cc").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#cc").fadeTo("fast", close);
  										});

										jQuery("#dd").mouseover(function() {
										    //alert("test1");
											jQuery("#dd").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#dd").fadeTo("fast", close);
  										});
										
										jQuery("#ee").mouseover(function() {
										    //alert("test1");
											jQuery("#ee").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#ee").fadeTo("fast", close);
  										});
										
										
										jQuery("#onyx").mouseover(function() {
										    //alert("test1");
											jQuery("#onyx").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#onyx").fadeTo("fast", close);
  										});
										
										jQuery("#opal").mouseover(function() {
										    //alert("test1");
											jQuery("#opal").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#opal").fadeTo("fast", close);
  										});
										
										jQuery("#inamorata").mouseover(function() {
										    //alert("test1");
											jQuery("#inamorata").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#inamorata").fadeTo("fast", close);
  										});
										
										jQuery("#np").mouseover(function() {
										    //alert("test1");
											jQuery("#np").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#np").fadeTo("fast", close);
  										});
										
										jQuery("#rp").mouseover(function() {
										    //alert("test1");
											jQuery("#rp").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#rp").fadeTo("fast", close);
  										});
										jQuery("#lasttest").mouseover(function() {
										    //alert("test1");
											jQuery("#lasttest").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#lasttest").fadeTo("fast", close);
  										});
																				jQuery("#westminster").mouseover(function() {
										    //alert("test1");
											jQuery("#westminster").fadeTo("fast", open);
  										}).mouseout(function(){
											jQuery("#westminster").fadeTo("fast", close);
  										});
										
											

/* ---------------------------------------------------------------- */
/*                          GALLERY PAGE                         */
/* ---------------------------------------------------------------- */													
												
		//Select each img and apply the following functions...
		jQuery('.gallery-icon a').each(function() {
			
			jQuery(this).bind("click", function() {
										   var targetItem = jQuery(this).attr("href");
										   //jQuery(".largeimage").html("<span class='red'>Hello <b>Again</b></span>");
										   //jQuery(".largeimage").html("<img src='targetItem' width='200' height='200' />");
											jQuery(".largeimage").fadeIn(500);
										   	jQuery(".largeimage img").attr("src", targetItem);
										  //alert(targetItem);
										  return false;
	
			});
			

  		});
		
											//Menu items
											jQuery('.sub-menu').hide();
											jQuery('.current_page_item ul').show(500);
											jQuery('.current_page_parent ul').show(500);

		
												jQuery('.close').click( function() {
												jQuery('.largeimage').fadeOut(250);
												//alert('test');
												return false;
		});

		
	// Initialize the plugin with no custom options
		jQuery(window).load(function() {
			jQuery("div#makeMeScrollable").smoothDivScroll({});
		});		
		
});		

		jQuery(document).ready(function(){
			jQuery(".scrollableArea	a").hover(function() {
				jQuery(this).fadeTo('500',1);
			}, function() {
				jQuery(this).fadeTo('500', 0.5);
	});


/* ---------------------------------------------------------------- */
/*                          ABOUT????? PAGE                         */
/* ---------------------------------------------------------------- */	
// PAGINATION
jQuery(window).load(function () {
   
	
	
		
		jQuery('#page2').hide('fast');
		jQuery('#page3').hide('fast');
		
		jQuery('#page1_btn').click( function() {
							jQuery('#page1').fadeOut(100);
							jQuery('#page2').fadeIn(800);
							jQuery('#page2_btn').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
		
		jQuery('#page2_btn').click( function() {
							jQuery('#page1').fadeOut(100);
							jQuery('#page2').fadeIn(800);
							jQuery('#page3_btn').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
									 
										 
		
		jQuery('#page3_btn').click( function() {
							jQuery('#page2').fadeOut(100);
							jQuery('#page3').fadeIn(800);
							jQuery('#page4_btn').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
		
		
		jQuery('#page1_btn_brand').click( function() {
							jQuery('#page2_brand').fadeOut(100);
							jQuery('#page1_brand').fadeIn(800);
							jQuery('#page2_btn_brand').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
		
		
		jQuery('#page2_btn_brand').click( function() {
							jQuery('#page1_brand').fadeOut(100);
							jQuery('#page2_brand').fadeIn(800);
							jQuery('#page3_btn_brand').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
		
		// PAGE 2 GO back
		jQuery('#page2_back').click( function() {
							//alert("test");
							jQuery('#page2_brand').fadeOut(100);
							jQuery('#page1_brand').fadeIn(800);
							jQuery('#page2_btn_brand').fadeIn(800);
						jQuery(this).hide();
							return false;
						});			
			
		jQuery('#page3_btn_brand').click( function() {
							jQuery('#page2_brand').fadeOut(100);
							jQuery('#page3_brand').fadeIn(800);
							jQuery('#page4_btn_brand').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
		
		jQuery('#page4_btn_brand').click( function() {
							jQuery('#page3_brand').fadeOut(100);
							jQuery('#page4_brand').fadeIn(800);
							jQuery('#page5_btn_brand').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
		
		jQuery('#page5_btn_brand').click( function() {
							jQuery('#page4_brand').fadeOut(100);
							jQuery('#page5_brand').fadeIn(800);
							jQuery('#page6_btn_brand').fadeIn(800);
							jQuery(this).hide();
							return false;
						});
// END PAGINATION


						 });



});
/* ---------------------------------------------------------------- */
/*                          TWEETS			                         */
/* ---------------------------------------------------------------- */


    jQuery(document).ready(function(){
        jQuery(".tweet").tweet({
            username: "ndclingerie",
            join_text: "auto",
            count: 1,
            auto_join_text_default: "we said,", 
            auto_join_text_ed: "we",
            auto_join_text_ing: "we were",
            auto_join_text_reply: "we replied to",
            auto_join_text_url: "we were checking out",
            loading_text: "loading tweets..."
        });
    });



