Subversion Repositories SmartDukaan

Rev

Rev 6970 | Rev 7017 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
6598 amit.gupta 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
74
 
4237 varun.gupt 75
	$('#shoppingExpInfo').click(function(){
76
		$.colorbox({
4284 varun.gupt 77
    		width: "550px",
78
    		height: "320px",
4237 varun.gupt 79
    		inline: true,
80
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 81
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
82
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
83
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 84
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 85
			onComplete: function(){
6261 amit.gupta 86
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 87
			}
4237 varun.gupt 88
    	});
89
	});
6245 kshitij.so 90
 
6552 kshitij.so 91
 
6970 kshitij.so 92
	$('.insuranceInfo').click(function(){
93
		$.colorbox({
94
    		width: "520px",
95
    		height: "280px",
96
    		inline: true,
97
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
98
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
99
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
100
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
101
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
102
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;'>Detailed Terms and Conditions</a>"+
103
    		"</ul>",
104
			onComplete: function(){
105
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
106
			}
107
    	});
108
	});
109
 
110
 
6959 kshitij.so 111
	$('.emiInfo').click(function(){
6453 kshitij.so 112
		$.colorbox({
6967 kshitij.so 113
    		width: "590px",
114
    		height: "480px",
6453 kshitij.so 115
    		inline: true,
6970 kshitij.so 116
    		href: "<br />" +
6967 kshitij.so 117
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
7011 kshitij.so 118
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months. Completely free for 3 months.<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
6967 kshitij.so 119
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
120
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
121
    		"<thead>"+
122
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
123
            "</thead>"+
124
            "<tbody>"+
125
            "<tr>"+
126
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
127
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
128
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
7011 kshitij.so 129
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
130
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6967 kshitij.so 131
            "</tr>"+
132
            "<tr>"+
133
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
134
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
135
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
7011 kshitij.so 136
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
137
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
6967 kshitij.so 138
            "</tr>"+
139
            "</tbody>"+
140
            "</table>"+
141
            "<br>"+
142
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
143
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 144
    		"<br>"+
6967 kshitij.so 145
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
146
    		"</ul>"+
6959 kshitij.so 147
    		"<br>"+
6967 kshitij.so 148
    		"</div>"+
149
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
150
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months. Completely free for 3 months. <br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
151
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
6970 kshitij.so 152
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 153
    		"<thead>"+
154
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 155
            "</thead>"+
156
            "<tbody>"+
157
            "<tr>"+
6970 kshitij.so 158
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
159
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 160
            "</tr>"+
161
            "<tr>"+
162
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
163
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
164
            "</tr>"+
165
            "</tbody>"+
166
            "</table>"+
167
            "<br>"+
168
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
169
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
170
    		"<br>"+
171
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
172
    		"</ul>"+
173
    		"<br>"+
174
    		"</div>"+
175
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
176
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
177
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
178
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
179
    		"<thead>"+
6970 kshitij.so 180
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 181
            "</thead>"+
182
            "<tbody>"+
183
            "<tr>"+
184
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 185
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
186
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
187
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
188
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
189
            "</tr>"+
6772 kshitij.so 190
            "<tr>"+
6967 kshitij.so 191
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
192
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
193
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
194
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
195
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 196
            "</tr>"+
6967 kshitij.so 197
            "</tbody>"+
198
            "</table>"+
199
            "<br>"+
200
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
201
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
202
    		"<br>"+
6970 kshitij.so 203
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 204
    		"</ul>"+
205
    		"<br>"+
206
    		"</div>"+
207
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
208
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
209
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
210
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
211
    		"<thead>"+
6970 kshitij.so 212
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 213
            "</thead>"+
214
            "<tbody>"+
6772 kshitij.so 215
            "<tr>"+
6967 kshitij.so 216
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
217
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
218
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
219
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
220
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 221
            "</tr>"+
222
            "<tr>"+
6967 kshitij.so 223
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
224
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
225
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
226
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
227
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
228
            "</tr>"+
229
            "</tbody>"+
230
            "</table>"+
231
            "<br>"+
232
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
233
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
234
    		"<br>"+
6970 kshitij.so 235
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
6967 kshitij.so 236
    		"</ul>"+
237
    		"<br>"+
238
    		"</div>"+
239
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
240
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months. <br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
241
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
6970 kshitij.so 242
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 243
    		"<thead>"+
6970 kshitij.so 244
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 245
            "</thead>"+
246
            "<tbody>"+
247
            "<tr>"+
6970 kshitij.so 248
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
249
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 250
            "</tr>"+
251
            "<tr>"+
252
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
253
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>5.58%</td>"+
6772 kshitij.so 254
            "</tr>"+
6967 kshitij.so 255
            "</tbody>"+
256
            "</table>"+
257
            "<br>"+
258
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
259
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
260
    		"<br>"+
6970 kshitij.so 261
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 262
    		"</ul>"+
263
    		"<br>"+
264
    		"</div>"+
265
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
266
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
267
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
268
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
269
    		"<thead>"+
6970 kshitij.so 270
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 271
            "</thead>"+
272
            "<tbody>"+
6772 kshitij.so 273
            "<tr>"+
6970 kshitij.so 274
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
6967 kshitij.so 275
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
276
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
277
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 278
            "</tr>"+
279
            "<tr>"+
6967 kshitij.so 280
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
281
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
282
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
283
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 284
            "</tr>"+
6967 kshitij.so 285
            "</tbody>"+
286
            "</table>"+
287
            "<br>"+
288
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
289
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
290
    		"<br>"+
6970 kshitij.so 291
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 292
    		"</ul>"+
293
    		"<br>"+
294
    		"</div>"+
295
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
296
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-kotak\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
297
    		"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
298
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
299
    		"<thead>"+
6970 kshitij.so 300
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 301
            "</thead>"+
302
            "<tbody>"+
6959 kshitij.so 303
            "<tr>"+
6967 kshitij.so 304
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
305
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
306
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
307
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 308
            "</tr>"+
309
            "<tr>"+
6967 kshitij.so 310
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
311
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
312
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
313
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
314
            "</tr>"+
315
            "</tbody>"+
316
            "</table>"+
317
            "<br>"+
318
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
319
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
320
    		"<br>"+
6970 kshitij.so 321
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
6967 kshitij.so 322
    		"</ul>"+
323
    		"<br>"+
324
    		"</div>"+
325
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
326
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
327
    		"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
328
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
329
    		"<thead>"+
6970 kshitij.so 330
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 331
            "</thead>"+
332
            "<tbody>"+
333
            "<tr>"+
334
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
335
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
336
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
337
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
338
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
339
            "</tr>"+
340
            "<tr>"+
341
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
342
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
343
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
344
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
345
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6959 kshitij.so 346
            "</tr>"+
6967 kshitij.so 347
            "</tbody>"+
348
            "</table>"+
349
            "<br>"+
350
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
351
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
352
    		"<br>"+
6970 kshitij.so 353
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 354
    		"</ul>"+
355
    		"<br>"+
356
    		"</div>"+
357
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
358
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
359
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
360
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
361
    		"<thead>"+
362
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
363
            "</thead>"+
364
            "<tbody>"+
6959 kshitij.so 365
            "<tr>"+
6967 kshitij.so 366
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
367
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
368
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
369
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 370
            "</tr>"+
371
            "<tr>"+
6967 kshitij.so 372
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
373
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
374
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
375
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 376
            "</tr>"+
6772 kshitij.so 377
            "</tbody>"+
378
            "</table>"+
379
            "<br>"+
6967 kshitij.so 380
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
381
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
382
    		"<br>"+
383
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
384
    		"</ul>"+
385
    		"<br>"+
386
    		"</div>"+
387
    		"<br><br>",
6453 kshitij.so 388
			onComplete: function(){
389
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
390
			}
391
    	});
392
	});
6245 kshitij.so 393
 
6792 vikram.rag 394
	$('a.mk_best_deal_detail').live('click', function(){
395
		var offerLinkHtml = '';
396
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 397
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 398
		}
399
		$.colorbox({
400
			width: "550px",
401
    		height: "300px",
402
    		inline: true,
403
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
404
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
405
    			'</p><span class="right">' + offerLinkHtml 
406
		});
407
	});
6453 kshitij.so 408
 
6792 vikram.rag 409
 
6245 kshitij.so 410
	$('#pickupstoreInfo').click(function(){
411
		$.colorbox({
412
    		width: "550px",
413
    		height: "370px",
414
    		inline: true,
415
    		href: "<h3>Frequently Asked Questions</h3><br />" +
416
		"<b>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
417
		"<b>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
418
		"<b>Q)</b> How do i avail this facility ?<br /><br />" +
419
		"<b>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
420
		"<b>Q)</b> When will the product be available for pickup ?<br /><br />" +
421
		"<b>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
422
 
423
			onComplete: function(){
6262 amit.gupta 424
				var ev = "Product Page";
6303 amit.gupta 425
				var label = window.location.pathname;
6264 amit.gupta 426
				if (label=="" || label=="#")
6261 amit.gupta 427
				{
6303 amit.gupta 428
					label = "";
6262 amit.gupta 429
					ev = "Home Page";
6261 amit.gupta 430
				}
6262 amit.gupta 431
				else if (label.indexOf("shipping") != -1){
432
					ev = "Shipping Page";
433
					var blkstr = [];
6263 amit.gupta 434
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 435
						blkstr.push(str);
436
					});
6303 amit.gupta 437
					label = blkstr.join(", ");
438
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
439
					ev = "Category Page";
440
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
441
					ev = "Product Page";
6262 amit.gupta 442
				}
6261 amit.gupta 443
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 444
			}
445
    	});
446
	});
4126 varun.gupt 447
 
5420 amit.gupta 448
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 449
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
450
		var widgetBox = $(this).siblings('.common-widget-content-area');
451
		var controlBox = $(this).siblings('.common-widget-control-bar');
452
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 453
 
4126 varun.gupt 454
		if (isColapsed)	{
455
			if(controlBox.length > 0)	{
456
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 457
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 458
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
459
				});
460
			} else	{
461
				$(widgetBox).slideDown();
462
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
463
			}
464
		} else	{
465
			$(widgetBox).slideUp(function(){
466
				$(controlBox).slideUp('fast');
467
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
468
			});
469
		}
470
		$(this).data('is_colapsed', !isColapsed);
471
	});
472
 
473
	/**
474
	 * Update count of products checked for comparison
475
	 **/
476
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 477
		updateCompareCount();
4126 varun.gupt 478
	});
479
 
480
	$("#research_compare").live('click', function(){
481
		var seldata = "";
5322 amit.gupta 482
		var prodnames = "";
4126 varun.gupt 483
		var tot = 1;
484
		var saprt = "";
485
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 486
		var haveSameProductType = true;
487
		var productType = null;
488
 
4126 varun.gupt 489
		$(par).each(function(){
4926 varun.gupt 490
 
491
			if(productType != null && productType != $(this).attr('producttype'))	{
492
				haveSameProductType = false;
493
			}
494
			productType = $(this).attr('producttype');
495
 
4126 varun.gupt 496
			if(tot == 1)	{
5358 amit.gupta 497
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 498
				seldata += "p" + tot + "=" + $(this).val();
499
			} else	{
500
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 501
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 502
			}
503
			tot ++;
504
		});
4984 varun.gupt 505
 
4926 varun.gupt 506
		if(! haveSameProductType)	{
507
			alert("Only products of same category can be compared");
508
		} else if(tot > 6)	{
4126 varun.gupt 509
			alert("Can compare upto five products only.");
510
		} else if(tot > 2)	{
5552 phani.kuma 511
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 512
		} else	{
513
			alert("Please select atleast two products");
514
		}
515
	});
516
 
517
	$("#research_delete").live('click', function(){
518
		var research_tot = $("#research_total").val();
519
		var seldata = [];
520
		var tot = 0;
521
		var saprt = "";
522
		var par = $('#myresearch').find('input[type=checkbox]:checked');
523
 
524
		$(par).each(function(){
525
			seldata.unshift($(this).val());
526
			tot ++;
527
		});
528
 
529
		if(tot > 0)	{
530
			var t = (research_tot * 1) - (tot * 1);
531
			$("#research_total").val(t);
532
 
533
			jQuery.ajax({
534
				type: "GET",
535
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
536
				success: function(msg)	{
537
					jQuery.each(seldata, function(intIndex, objValue){
538
						delete_from_storage_set("resitems", objValue);
539
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
540
							$(this).remove();
541
							if(t === 0)	{
542
								$("#research_default").css("display", "block");
543
							}
544
						});
545
					});
4984 varun.gupt 546
 
4922 varun.gupt 547
					//Updating the count
548
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 549
 
550
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
551
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
552
					}
4126 varun.gupt 553
				}
554
			});
555
		} else	{
556
			alert("Please select atleast one product");
557
		}
558
	});
559
 
560
	// No uid cookie
561
	if (!$.cookie("uid"))	{
562
		// No uid in storage
563
		if (!$.Storage.get("uid"))	{
564
			if (!$.Storage.get("resitems"))	{
565
				$.Storage.set("resitems", "[]");
566
			}
567
			if (!$.Storage.get("histitems"))	{
568
				$.Storage.set("histitems", "[]");
569
			}
570
		}
571
		else	{			// uid in storage : logout
572
			$.Storage.remove("uid");
573
			$.Storage.set("resitems", "[]");
574
			$.Storage.set("histitems", "[]");
575
		}
576
		load_research_widget();
577
		load_history_widget();
578
	}
579
	else	{				// With uid cookie
580
		var cookie = $.cookie("uid");
581
		// Just logged in merge storage items
582
		if (!$.Storage.get("uid"))	{
583
			$.Storage.set("uid", cookie);
584
			merge_history_items();
585
			load_research_items();
586
		}
587
		else	{
588
			// UID changed
589
			if ( cookie != $.Storage.get("uid"))	{
590
				$.Storage.set("uid", cookie);
591
				$.Storage.set("resitems", "[]");
592
				$.Storage.set("histitems", "[]");
593
				merge_history_items();
594
				load_research_items();
595
			}
596
			else	{		// Uid is same
597
				if (!$.Storage.get("resitems"))	{
598
					$.Storage.set("resitems", "[]");
599
					load_research_items();
600
				}
601
				else	{
602
					load_research_widget();
603
				}
604
 
605
				if (!$.Storage.get("histitems"))	{
606
					$.Storage.set("histitems", "[]");
607
					merge_history_items();
608
				}
609
				else	{
610
					load_history_widget();
611
				}
612
			}
613
		}
614
	}
4798 varun.gupt 615
 
616
	function load_research_items(){
617
		jQuery.ajax({
618
			type: "GET",
619
			url: "/myresearch",
620
			cache: false,
621
			success: function(json) {
622
			    $.Storage.set("resitems", json);
623
			    load_research_widget();
624
		    }
625
		});
626
	}
627
 
628
	function load_research_widget(){
629
		var myResearchWidgetContainer = $("#myresearch");
630
 
631
		if($(myResearchWidgetContainer).length == 0) {
632
			return;
633
		}
634
		var resitems = $.Storage.get("resitems");
635
 
636
		if (resitems == "[]") {
637
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
638
		      <tbody>\
639
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
640
		       </tbody>\
641
		      </table>';
642
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
643
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
644
			return;
645
		}
646
		var params = "/" + resitems;
647
 
648
		jQuery.ajax({
649
			type : "GET",
650
			url : "/myresearch" + params,
651
			cache: true,
652
			success : function(html) {
653
	   		    $("#myresearch").html(html);
654
	   			updateCompareCount();
655
 
656
			    // Product Title
657
			    $("#myresearch table td div a.truncate").each(function() {
658
						$(this).truncate({addtitle : true});
659
			    });
660
 
661
			    // Product Price
662
			    $("#myresearch table td div div.price").each(function() {
663
						$(this).truncate({addtitle : true});
664
				});
665
 
666
			    // Product Details
667
			    $("#myresearch table td div div.text").each(function() {
668
						$(this).truncate( {addtitle : true});
669
				});
670
		    }
671
		});
672
	}
4126 varun.gupt 673
});