
$(function(){ 
 	$('.slider-nav li').hover(
    	function(){
    		var index = $(this).parent().find('li').index(this);
    		_scroll(index);
    	},
    	function(){}
	);

    $('.gallery-list ul li .image-1 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-1').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-2 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-2').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-3 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-3').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-4 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-4').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-5 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-5').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-6 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-6').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-7 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-7').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-8 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-8').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-9 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-9').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-10 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-10').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-11 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-11').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-12 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-12').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-13 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-13').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-14 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-14').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-15 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-15').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

    $('.gallery-list ul li .image-16 img').qtip({
	    	content: { 
	    		prerender: false,
	    		text: $('#box-16').html()
	    	},
           	position: {
				target: 'mouse',
				adjust: { mouse: true },
				corner: {
					target: 'topRight',
					tooltip: 'bottomLeft'
			    }
			},
			show: { 
				delay: 0,
				when: { event: 'mouseover' },
				effect: {
					efect: 'none',
					length: 0
				}
			 },
           	style: {
           		background: '#BCDFE7',
           		color: '#333',
              	border: {
                	width: 3,
                	color: '#A6D5DF'
              	},
              	tip: { 
              		corner: 'bottomLeft',
            		color: false,
            		size: {
            			x: 12, 
            			y: 18
            		}
	            },
              	padding: 10, 
              	name: 'cream', // Style it according to the preset 'cream' style
              	width: { 
              		min: 210,
              		max: 210
          		}
           	}
	    });

 	$('.slider-nav li').hover(
    	function(){
    		var index = $(this).parent().find('li').index(this);
    		_scroll(index);
    	},
    	function(){}
	);
	$(".stars-wrapper1").stars({
    	cancelShow: false
   	});
   	
   	$('.stars-wrapper1 .ui-stars-star:odd').css('margin-right', '3px');
   	
   	$('.gallery-list ul li').hover(function () { 
   		$(this).addClass('hover');
   	}, function () { 
   		$(this).removeClass('hover');
   	})
})
// Create the tooltips only on document load

function _scroll( index ) {
	var w = 473;
	var left = -1 * index * w;
	$('.slider ul').stop();
	$('.slider ul').animate({ 'left' : left + 'px' });
	
	var w2 = 46;
	var left2 = 1 * index * w2 + 5;
	
	$('.slider-nav .slider-active').stop();
	$('.slider-nav .slider-active').animate({ 'left' : left2 + 'px' });
}

